I know this is the last thing you want to hear, but you need to start choosing better friends who do not possess contraband while in your presence. Now that the obligatory youthful chastisement is out of the way....you're basically screwed.
Without knowing the specifics of your situation I'm going to assume that as the driver of the car you were in what's known as "constructive possession" of marijuana. What that means is, they may not have been your drugs, but you apparently had knowledge of the items and the ability to exercise control over them. That's all that's necessary to meet the requirements of possession.
Unless the drugs were found on your friend's person and you were totally unaware he possessed them, the law requires you to share in the responsibility for their possession.
What potential penalties you face is dependent upon what specifically you were charged with (crime section). However, I can tell you that any minor (age under 21) convicted of a marijuana, alcohol, or other drug offense faces a 12-month drivers license suspension, regardless of whether the offense was driving-related (Vehicle Code 13202.5).

