This is how it works on PS3 but if you have an XBox it should be similar;
First of all make sure you have a fully auto weapon (SMG) and also a single shot weapon.
As you take cover against a wall or other object DO NOT release R2.
Select the SMG and begin firing at your target then switch to the single shot weapon and it will also be fully auto - the shotgun is best.
Remember you must not release R2.
As you get used to it you can cycle through your weapons back and forth creating a never ending blast of automatic fire.