The way I did it is on a trampoline, start with a simple roly poly and then gradually build the height, bouncing on your knees then roly polying, then jumping, then take time to heighten it and within a few days/weeks I was able to do a flip, you need a lot of time to perfect it on ground though :-)
Start on trampolines. Try doing a forwards cartwheel/hand spring. You could go to Extreme Air park ans start there. Once you are more confident. Try holding your hands a little higher so they don't touch the trampoline/ ground. Then you can work on tucking in and doing it on solid ground.
Preparation.
The best way would be private lessons with a tumbling coach.
wing it