Okay, this is the most basic approach I teach to brand new students for self-defense purposes:
Step 1) Shut down the striking. It may be technically possible to win a striking contest from the bottom, but it is highly unlikely to work out well for you. If your opponent is sitting up to rain down punches on you, sit up and grab him around the torso with your head glued tight to his chest. Drive both feet into the ground and use the power of your legs and back to drive your own shoulder blades to the ground, pulling the opponent forward so that he has to put his hands on the ground and can't use them to punch you.
Step 2) Scootch your body up towards your opponents head so that your arms are now holding him around shoulder level. Keep hugging his back and keep the side of your head glued against his chest so that he can't hit you.
If you are facing to your left, keep hugging your opponent's back with your right arm. Use your left arm to overhook your opponent's right arm and pull it in tight to your body so he can't post out with his arm. Use your left foot to trap your opponent's right ankle so he can't post out with his leg.
Step 3) Bridge your hips up and then go to your left, rolling your opponent to his back and coming up onto your knees. As you come over, swim your hands to the inside of your opponent's biceps so he can't strike, eye-gouge, or hair-pull from the bottom. You will end up in your opponent's guard.
Step 4) Make sure you end up in good posture, with your head over your hips. Since you are not a ground fighter, stand up and back out of your opponent's guard immediately. If your opponent is a jiu-jitsu fighter, that might take some technique, but the odds of you ever getting mugged by a jiu-jitsu practitioner are very small. Against most folks, you will probably just be able stand up as long as your posture is good.
There are a lot of additional "what-ifs", I could go into (what if I can't overhook his arm? what if he grapevines my legs? what if he grabs my head?, what if he's trying to choke me instead of punch me?, etc, etc), but this is one of the very first lessons I teach to new white belts.