Lie flat on the ground with your legs extended straight up toward the ceiling. Place your hands underneath the back of your head. Or for added stability, place your arms out to your side, allowing the palms to grip the floor (much like you would in a push-up position).
Pressing your lower back into the ground, slowly lower both legs down toward the floor, then slowly raise them back up to complete the rep. If this is too difficult, lower them as much as you can or lower one leg at a time.