When working on your abs, it is important to note that the muscles aren't working in isolation. Together with your back muscles your abs are responsible for your posture and body balance, which means that some of the exercises on your road to six pack abs will be those that make your entire core work. A couple of good examples of this are squats and deadlifts.
The basics: Sit-ups and crunches
One of the most iconic ab exercises is the sit-up, which is done by lying on your back on the floor or a mat. You raise your knees and put your hands either on your chest or otherwise so they aren't interfering. Then with a straight back your upper body to a near-sitting position before you lower yourself back down. Keep repeating. To increase the potency of the exercise when you've mastered it, you can hold weights to your chest while doing the sit-ups.
Crunches are fairly similar to the sit-up, with the difference that instead of lifting your entire upper body, you only lift the shoulders towards your knees. Note that you should not lift your entire back, as this can be detrimental to your body. Lift your shoulders while slowly exhaling and flexing your abs. When you've raised your upper torso, pause and exhale fully before slowly lowering it to its original position with shoulders just touching the ground/mat. Keep repeating.
Using your legs to strengthen your abs
Two ways to use your legs to help your ab exercises are the jackknife sit-up and leg lifts. The jackknife is similar to a regular sit-up, except you start with your legs lying parallel to the ground, then lift them in unison with your upper body. Your knees should meet your face at the top of the sit-up and you should also be able to touch your feet. Slowly lower yourself to your original position, then repeat.
When doing a leg lifts, start by lying down on your back on the floor or a mat. Keep your legs unbent and lift them straight up until they're on an angle about 90 degrees from the floor. Lower your legs slowly without letting them touch ground and repeat. Be careful not to use your arms and hands to aid you in the exercise.
Static holds & butt-ups
Doing a static hold means you lie face down on the ground then use your arms to raise yourself to your elbows and toes. With your forearms are resting on the ground and your body being kept as straight as possible, you just hold this position for as long as you can endure. You can also do static holds on your side, with only one arm resting on the floor and the other one pointing at the roof/sky. A good exercise for working out other parts of your body, as well.
A butt-up is very similar to the static hold, except instead of holding the position you raise your buttocks upward as high as possible, before lowering it back to its original position (not lower!). Keep repeating.
The sides of your abs
Many of the exercises above, like crunches and static holds, can be done on your side to train some of the muscles on the side of your stomach. An example of a good way to exercise your oblique muscles (as they are called officially) is the so-called bicycle crunch. Here you do a regular crunch, with the added movement of alternately lifting your knees towards the opposing shoulder. All gym exercises where you twist your torso sideways against a resistance helps develop your oblique muscles.
Pull-ups and ab rolling
Doing hanging pull-ups from a bar activates a lot of muscles, including abs. Do a few with palms toward you, then shift to palms away. A simple exercise that can be hard for beginners but which comes with a good pay-off.
You can also use and ab roller to develop your abdominal muscles. You lie face down on the floor on your knees before grabbing the roller and, while lying on it and your toes, pushing the machine as far away from you as possible until you're horizontal. Return slowly to your original position and repeat. If you don't have access to an ab roller this exercise can also be performed with a dumbbell.