PLEASE PLEASE PLEASE HELP

i got caught driving with a permit without an adult.. well the cop thought it was a license and let me go with a ticket. we went to pay the ticket but they said they don't handle minor so when we went to the other place they said we'll get a letter in the mail saying what's happening. they don't have a price or pay by date so does that mean court? what will the court do? i'm sure they will find out i was driving without a licensed driver and whatever. also isn't this partly the cop? bc he didn't know my permit was a license? please help.