No one likes a sniper. Snipers hate other snipers and other players hate snipers, so in general most people will hate you. Aiming with a sniper rifle is somewhat of an art form and really the best way to get good at it is to practice and learn to lead your targets. One of the most important advantages of the sniper is of course the ability to kill at a distance. So if you're rushing the front line, don't do it with a sniper rifle!
First of all, if you want the best results from a sniper rifle you need to have a long draw distance set on your graphics. You can change this to 100% under your graphics settings. Secondly, shots at a distance require an accurate shot, so don't clench the mouse as you press the button. If you have a high sensitivity setting on your mouse, even the click of the mouse can throw off your shot. So think of going to your control settings and setting a secondary fire button. You can even use a joystick button set off to the side of the keyboard. This way you line it up and click the other button and your cross hairs don't budge at the last second because of mouse movement.
The best way to keep aware of what's going on around you while zoomed in is sound. Make sure you're able to clearly hear what's going on. Many times just keeping your ears opened will save you from being knifed. If you listen carefully, you can actually hear the footsteps of an approaching soldier.
The most important thing is to hit and run! You kill a guy once and he's going to be pissed and looking for you. Most likely he will respawn as a sniper. He even may have seen you right before you put one in him, so it's best to hit and move. Pick an area and figure out a rotation of spots from which to shoot. Hit, move to your second spot, hit move to third, etc. If you do find a good spot and you don't want to move for whatever reason, remember that if you kill someone you have 15 seconds (on ranked servers) to hide before they respawn. If you do so, then when the guy makes his respawn and comes looking for you, if you're down and hidden he will either think you're not in that spot, think you've moved on, or he'll just come stab you. After a few moments you can pop back up and hopefully he will be gone. Remember, even if you have the greatest spot, a game feature called UAV has been added, which has the ability to see through even the best hidden spot. So keep on the move or at the very least you'll have artillery falling on your head after a short while.
Your weapon of choice as the sniper kit will be your rifle of course, which is great for long distance. However up close the rifle will be ineffective. You'll want to use the pistol, which is great for medium distance shots while you make your retreat. If you find yourself up close and personal, the pistol doesn't have great stopping power so you may want to switch to the knife instead. If you're good with it, even a shotgun user can be dropped before they know what hit them. You also have grenades, which are great for lobbing at flags to clear out attacking troops and various other uses. The most interesting weapon of all though is the claymore.
Try not to stay too concentrated on your sights and keep an eye on your minimap. One reason snipers are hated is because they get over focused on their cross hairs and they don't watch the minimap. There's little point to hiding out in your super-duper secret sniper spot with no idea that your flags are already gone. Keep an eye out to see if your team is in trouble, and if so join the fight and get a flag back! Also, if you're not paying attention to what's going on around you, you may find that the flag right under your perch has just changed to the enemy side and you're surrounded by 5 guys with knives. Keep your ears and eyes open. Watch your minimap and make sure your sound is way up!