Biting is not a natural behavior for birds, so chances are that your bird is not trying to be aggressive. There are several reasons that a bird may "beak" you as opposed to giving you a true bite. Many times, birds use their beaks as a third "hand", or to "test" perches before they step on to them -- and bird owners often confuse this with being bitten. While being "beaked" may not be the most pleasant experience, it is much different from being bitten, and anyone who has ever really been bitten by a bird will tell you the same thing!
Birds will dish out a true bite now and then if they are frightened or feel cornered. These bites are often quick and hard -- and the bird's body language will let you know that he or she did it with the intention of causing pain. Many times a true bite will break the skin, or at least result in a painful "dent".
Once you have determined if you are being bitten or "beaked", it will be much easier to learn how to deal with the behavior. If you are being beaked, the only real option is to put up with it. It's a fact that birds use their beaks in this way and the most experienced bird owners understand that it's all just part of owning a bird. If you are in fact being bitten, however, there are steps that you can take to help put your bird at ease, and curb this undesirable behavior. For tips on taking the bite out of your bird, look over Correcting Bad Behavior in Birds.