How to survive a moshpit?

I'll have to go at my First concert and I'm scared about moshpit, any advice for surviving it but enjoying the show at the same time?