Leg raises are great for building core strength. It is important to build your awareness around your hips, so that you can recognize when your in an anterior versus a posterior pelvic tilt. Basically, this is when your back is flush with the ground. The top of your hip has to go back. You do this by squeezing your glutes.
Just like other exercises, take your time, be mindful, and master the basics.