Most states have a tiered age of consent. For example:
Sex with any peson under 12 is a crime.
Sex with a person 12-14 is a crime unless the other participant is within 2 years of the victim's age.
Sex with a person 14-16 is a crime unless the other participant is within 4 years of the victim's age.
Any person over 16 can consent to have sex.
Some states allow the affirmative defense (which means the defendant has the burden of proving) that the defendant thought the victim was over 16, & that is was reasonable for the defendant to think this. Some states only allow this defense if the victim is at least 14 in actuality, regardless of how old the defendant though s/he was. Most states don't allow this defense at all.
"Sex" means any vaginal, oral, or anal penetration, no matter how slight, or any oral sex.
If you want to look up the laws in every state, go here:
www.findlaw.com/11stategov/index.html & check out the 'primary materials' & state codes/statutes for each state.
------------------
This is not legal advice and you are not my client. Double check everything with your own attorney and your state's laws.