Let your instructor know. Only work with people you trust.
Assuming you are in some kind of striking art and have worked your way up to where they introduce grappling...
A good instructor should be able to work out some drills for you:
- Block, strike, take down, pin, start over
- Block, strike, take down, pin 1, transition to pin 2, start over
- Block, strike, take down, pin, submission, start over
- Block, strike, take down, pin, escape, start over
When you start over, uke and tori trade places. Get a bunch of reps of each before moving on.
Once you can do the drills, start to introduce light resistance, once the pin is made. Then slowly increase the resistance.
This way the grappling comes in small chunks that get a little longer. Once you start introducing the resistance, soon you will just decide to skip the get up again and just start over from the pin.
If you just signed up for a BJJ or wrestling type school... well, this is what you signed up for and it will just take time. Still, let your instructor know. You won't be the first, and your instructor should know how to introduce you to the grappling. (actually, in both cases your instructor should know how to more comfortably introduce you to grappling)
At the end of the day, never forget that you still have the right to say "No." If you are uncomfortable, for any reason and would rather skip it... the techniques are not going anywhere... they will still be there when you are ready. For example, if you are on the third drill above and you start feeling uncomfortable, just let your partner know you want to go back to drill 1 or drill 2 for the remainder of the time... since you already let your instructor know what was going on, it should be ok, maybe next class number 3 will be ok. This way you are still in control.
Finally, talk to your instructor. (I said that a few times for a reason

)