Leg raises are perceived to be one of the exercises for the abdominal group. This is because the abs feel worked during the set.
The rectus abdominis (RA) does work to anchor the torso on the ground but only isometrically. It is the hip flexors working dynamically (concentric/eccentric or shortening/lengthening) to raise the leg (hip flexion). When the hip is off the floor and the legs are pulled in all the way, that is when the RA works dynamically, read reverse crunch(trunk flexion).
Start with raising legs off the floor to 90 degrees. They can also be performed on the parallel bars used for dips.
Move to weighted leg raises as progression.