Lunging is a little more complex than it seems, but you are correct if you are thinking it may help improve a horse's discipline and help control the horse's energy level.
Next, then, how to lunge....
The simplest way to lunge your horse is in its halter and without a whip. Personally I prefer this method for several reasons: 1) less equipment means more ability to focus on the horse and 2) you can send the horse in both directions without resetting the lunge line. But for this to work, you need a willing horse who's been lunged before. Otherwise you may need the whip.
However, there are also reasons to lunge under saddle with a bridle, and I'll get to how to do that in a moment.
Enter the arena or round pen with your horse. Make sure there is enough room for the horse to go in both directions and complete a circle if you are standing halfway across the enclosure. In a round pen, this is not a problem, but in an arena, the easiest spot is the exact center of the arena or the center of a circle at one end or the other.
Stand at the center with your horse.
Attach the clip end of the lunge line to the part of the halter that connects to the lead rope. Then disconnect the lead rope. If you reverse the order of this you may have an escaped horse to deal with. It's not a bad idea to make sure all gates are closed before starting, so if you drop the line, the horse stays inside the arena.
Pick a direction to send the horse. If this direction is clockwise, hold the lunge line in your right hand. If it is counter-clockwise, hold the line in your left hand. If you are using a lunge whip hold it in the other hand. Be careful to not wave the whip around until you are ready to start or you may spook your horse.
Take a moment to assess your horse, the lunging process and your plan for this session. If your horse is restive, prancy or otherwise not staying still, he is nervous about this new event or his surroundings. Take him for a normal walk around with the lunge line as a lead rope until he calms down. He may also be afraid of the whip. Consider not using it for the first session, especially if this is the case. If you want to use it, but he seems restive about it or spooky, put him back on the lead line and introduce him gradually to it, starting by letting him smell it and eventually getting him to allow you to rub his entire body with it.
Now, if the horse is calm and standing nearby and you have your plan, look firmly at the horse's flank (not his eyes) step toward the flank,. point your line-holding hand in the direction you want him to move and say "walk" as you normally would in the saddle. If the horse does not move and you are not using a whip, whirl the end of the lunge line that is not connected to the horse toward the flank of the horse, while walking toward the flank and saying "walk". If you are using a whip, brace yourself for potential unintended consequences and tap the horse on the buttock with the edge of the whip.
If at this point, the horse is not walking, tap him on the flank with lunge line or the edge of the lunge whip stick, slowly increasing the frequency and intensity. When the horse starts to move, immediately stop whirling or tapping. This teaches the horse that he did what you wanted.
Under normal circumstances, a horse that knows lunging will walk away into the largest circle you let him have with the lunge line. Ideally, you want a slightly slack lunge line so that the horse is willngly lunging himself in a circle. You want to keep looking at his flank and you want to correct him, either by whirling the free end of the line or gently waving the whip, if he stops moving. If he comes too close, wiggle the line to send waves toward his head.
You need to make the error correction cue before adding a faster whirl or additional whip motion. Eventually the horse will internalize the error correction cue and you will be able to reduce or eliminate the need for whirling the line or using the whip.
Remember to start as gentle as possible with the whirling and the whip cues. Especially in the case of a "hot horse" you do not want to excite the horse to become speedy. If the horse does become speedy, call "whoa" and tug on the lunge line. The horse should stop and face you. If not, repeat the cue and the tug, with the tug a little harder. Once he stops, then say, "walk" and repeat the process. Later, you can name the gait and use the tug if he fails to comply.
This period may be frustrating for you and the horse. If you find the horse is not responding, you should keep patiently correcting him until he responds. You can add pressure (faster whirling, more line in the whirling, more whip motion, even up "cracking the whip"). But do this slowly. The last thing you want is your horse rocketing into the circle.
A common mistake that prevents the horse from responding is to face your core toward the front of the horse, as if blocking his motion with your body language. This is common, when you are also looking at his flank but are alighly ahead of him. If you need to, extend the lunge line arm as far out as you can, so the horse can get ahead of your core while you look at his flank. And don't directly look at his head unless you want him to stop.
Think of the core as a searchlight you are using to press the horse into motion. Train that searchlight on the hindquarters and this pushes the horse away. The lunge line then puts him into the circle.
Once the horse is moving in the circle, say "good horse" or whatever you say to let the horse know he is doing well. Do this from time to time. It is really the only reward outside of rest you can offer him.
OK, so now he's walking, do this for a while, especially if he's obviously excited or fast in his walk. Wait for it to become relaxing to him. Use this period to assess his gait. Is he fast and extended? Is he walking with a good rocking hip action that suggests happiness? Is is tail slightly elevated but calm, indicating happiness, or is it swishing and twisting, indicating anxiety? Is he looking to you slightly (too much and he'll stop) or is he looking outside the circle, worried about other things in the arena?
After the horse is walking for a while and seems comfortable. stop him with "whoa" and if he doesn't stop, follow with a tug on the line, escalating if needed. Give him some love and let him stand as a reward for stopping. Then move toward the other side of the horse, looking at that flank and send him the opposite way.
Again, be patient and only slowly escalate pressure if he is not responding.
If he has walked both directions and you haven't had any problems, consider stopping work and putting him away as a reward.
The next steps in lunging are to ask him to trot and then to canter. Start him at the walk. A typical horse takes a second or two to respond to the voice cue, so say "trot" and wait a little while. If he doesn't respond, repeat the cue and whirl the free end of the line or wave the whip. If he still doesn't respond, repeat the cue and whirl / lunge toward his flank slightly. Snap the whip when nothing else works. Make sure you're using the right cue (different horses may respond differently to a click, cluck or kiss) and repeat until he gets it. Again, try not to startle him. You want him to enjoy lunging.
If he is trotting fine, you should be able to downshift him to the walk by saying "walk". If he doesn't respond, repeat the cue. If he still doesn't respond, repeat the cue and tug gently on the lunge line. Repeat this process, escalating the effort in the tug until he drops to the correct gait. Then praise him with "good horse" and let him stay in the walk for a few circles. He may stop, so correct him and get him back to gait.
Once he goes fine up and down, walk / trot / walk, you can use the same technique for the canter.
Occasionally, every horse will bolt when cued to the canter in the lunge, so be prepared for speed when you are about to cue the canter. Hold the lunge line firmly, but do not wrap it around your hand, which can lead to injury.
If your horse is fast, you want to use this opportunity to teach him the hum or the "easy" cue. So get him into the canter and let him take his normal speed. But if he is galloping or out of hand, cue "easy" and tug the lunge line, repeating and escalating the tug until he slows, or if he is not responding, use "trot" and if that does not work, stop him with "whoa" and start again.
When he is too fast, always say "easy" and if he doesn't slow, tug. If he drops gait, use the error cue and chase him slightly with the whirling or the whip to get him back up into the gait.
This is the training part and you need to be patient and not overwork this in any one session. For each session, reestablish the walk / trot / walk control, then walk / trot / canter / trot / walk / whoa.
Don't forget to use the same "warm up / cool down" time you would use for a session under saddle, or you may injure the horse's joints or tendons.