You need a chin-up bar or something you can hang from for this. Grab the bar with both hands with a grip a bit wider than your shoulders, cross your ankles and bring your knees up to your chest (or as close as you can get). Your pelvis should rock slightly forward. Pause at the top of the movement for a second and then slowly lower your knees by relaxing your abs. Don't lower your legs all the way. Repeat the movement using just your abs to raise your knees.
Make sure that you don't start swinging. You want your abs to do the work, not momentum. It's important that you don't move your legs too far or your psoas muscle will be doing a lot of work and possibly causing back problems as in a situp.
Make sure your pelvis moves, your lower back stays neutral or slightly rounded, not arched, and that your abs are doing the work, not your hips.