Although the gymnast demonstrating the drill has not mastered all its technical details correctly and is still showing too much pancake position, the final goal is to turn over forward the whole body in one single unit with the straddle legs moving backwards and closing without the gymnast getting stuck or exhibiting a very deep pancake.
The foam pit is highly important with many vaulting skills. The purpose of a foam pit is to offer an opportunity to practice a difficult skill without having to worry about the landing.
The gymnast should twist right if his right hand touches the vault first, and twist left if his left hand touches first. It's usually a good idea to attempt most of the vaulting repetitions on soft surfaces to reduce the chance of injuries.
The following clip shows a drill that helps gymnasts learn the Kasamatsu. At first, the gymnasts get familiar with performing a cartwheel into the pit. Then, as they improve, they add a side somersault. The next step would be to add a quarter twist. Now they are ready for the Kasamatsu.