maxkid: Normally you pop straight back up, so maybe 5 seconds. On bigger days you can be held down for up to 30 seconds, but being 12 and asking such a question I doubt you're out during those days.
Big wave riders are sometimes held down for over a minute and can be held down whilst a second and third wave crashes on top of them.
If you're being held down for a long time the idea is to stay calm and not panic. If you panic you use up all your oxygen and significantly increase the risk of drowning - even in smaller waves.
My best tips are to think of when you're being born... as soon as you fall on a big wave and know you will be held under just put yourself into that state and let the wave do what it needs to do with until you pop back up. Another good one is to make it a competition with yourself about how long you can keep your breath. When you fall, just say to yourself "let's see how long we can keep our breath this time" and start counting. Most people are able to keep their breath for a minute if they just stay calm, so unless you're out where you shouldn't be, you will always be fine. It may sound silly, but you'll be amazed of the difference. I've had near drowning where I've paniced and started breathing in water, just sinking in the white wash. These tricks have helped me through even worse situations...