Short bursts. Most newbs try to hose everyone down, but you won't hit much of anything that way. Fight the urge to hold down the button and click instead. Your accuracy will go up, and so will your kills.
If you are running a sniper, use your gaymores to cover your back. Put them at the travel path to where you are, preferably just around corners and out of sight.
Along the same lines, special forces C4 makes a nasty surprise when they don't see it. Plus, you can detonate it from a long ways off.
My favorite class is Support. Big gun, unlimited ammo. Toss your grenades, drop a ammo bag, toss more grenades.

Once you learn how to use bursts, you can pick off targets at long range with your LMG.
Use your surroundings to your advantage. If you are being gunned, run around a corner, stop and drop. Odds are your pursuer will come barreling around trying to finish you off. Just give him a face full of lead.
If someone is prone on a roof, they can be hard to hit. Use the right mouse button to throw a grenade just high enough to get it to the roof. Also, most newbs get too close to the edge, exposing themselves to fire from below.
If you can get some distance between you and them, set up a killing zone. Concentrate your firepower where they will be coming at you from... like an alley, around a corner, between rocks. Don't let them choose the place, you do it and make them come to you.
And, as was said above, practice, practice, practice. BF2 is not a spray and pray type of game... it actually allows you to use your aim to your advantage.