When first starting out with fly fishing you need to learn how and when to use the different casts and techniques for getting your line and ultimately the fly tied onto the end of the line out onto the water in a smooth and graceful manner.
You can't always be smooth and graceful (especially on long distance casts) but that is the general idea.
Generally you first learn to cast using the 10 and 2 technique of smoothly and evenly waving the fly rod back and forth as if you are standing in front of a large clock between the 10 o'clock and the 2 o'clock positions. The simplest way to think about this is to watch a metrodome rocking back and fourth with the arm being the fly rod. 10 and 2, 10 and 2, 10 and 2.
This is a gentle and graceful technique timed with the fly line moving overhead. The fly line and tippet should not snap like a whip crack! It should smoothly transition for the forward and back motion until landing gently on the water.
This is known as "false casting" and it is used to position the fly to the area on the surface of the water you want it to land or to let out additional line or both.
Beyond the basic fly cast technique there are some additional casting styles and techniques that can help you get your line out further or help in very specific situations when they arise.
Single Haul - If you learn no other casting techniques, you need to learn how to haul. A haul simply loads up the rod by pulling on the line and then releasing the line and shooting it through thereby adding distance to your cast.
Double Haul - For very long distance casts when paired up with a weight forward style line.
Shooting the Line - For adding distance onto your casts you need to learn how to effectively shoot the line. Shooting the line picks up the slack line coiled at your feet and pulls it out as you swing the rod forward as if finishing off a cast. Depending on the type of line you are using and the size and style of rod you can easily add ten or more feet of distance to your casts.
Roll Cast - For tight spots or brushy creeks when you can't get a full cast out behind you. The roll cast requires much practice to perfect without slop and splash landing your fly.
To roll cast you need very still water, start by slowly pulling on the line to get it moving back towards you and then quickly whip the rod tip forward and down with the tip moving in an almost circular pattern. This will "throw" a loop or roll down the line and can be used to add distance.
Slack Line Cast or S Cast - For putting extra "slack" into the line when it lands on the water to adjust for moving currents and avoiding drag on your dry fly.
Right at the end of a cast wiggle the rod tip back and forth which puts slack or S's into the line as it lands on the water.