Loose Leash Walking
Loose leash walking is pretty much as the name suggests. It requires no more than having the dog walking with you without it pulling the leash taut. The dog does not have to be paying attention to you, does not have to be in line with your leg/hip, and can in fact walk slightly in front or behind you, depending on which you prefer.
How I train it, and always have done to great effect is as follows:
1. Decide exactly what you consider a loose leash to be. For me, I don't like my dog's nose to be any further forward that my left foot when it steps out to full stretch. This step is more important that it sounds. How can the dog know where the boundaries are, if you don't have them firmly in mind first?
2. Before you ever set off for a walk, have the dog sit by your side (left side is most common) and get it to look up at you.
3. The second the dog gives you its attention, say "Fido, let's go.", or similar. Do not use the term "heel" if you later want to train heel-work.
4. The split second that the dog walks further in front than you would like, say "ah-ah", "oi", or similar, and immediately do a 180 degrees turn and walk the other way for a few paces (The dog will feel a very short "pop" on his leash as you turn and pull the other way, but that is all that it is. You are not aiming to give the dog a leash correction.) until the dog is in the correct position.
5. Click, reward, and casually turn around again, but without the "ah-ah" or "oi", so you can continue to walk where you were originally going.
I personally don't like to to praise my dog verbally when she's doing well on a loose leash walk, as she is still very young and gets easily excited, which breaks her focus. However, you should decide for yourself what is suitable for your own dog.
I also don't ever stop for my dog to sniff the ground or socialise with other dogs while on leash. Once trained I would suppose it's fine to allow both, but in the early days, I think it's important to just keep the momentum going as much as is humanly possible.
It can be frustrating for a few days as you seem to be forever turning around, and getting funny looks from passers-by, but the way I look at it is, that the looks you will get doing this will be nowhere near as bad as the looks as you will get if you later have a dog that is pulling you down the street on its leash. So, a few days now, or a lifetime later. It's a no-brainer as far as I'm concerned.
I've never known this method not to work on a dog yet. Another common method given is to just stand still when the dog pulls. The trouble with that is the dog will often be quite happy to sit there too, and then just carry on pulling as soon as you set off. Plus, you want to teach the dog to be on a loose leash as you move, not as you stand still.
It is quite common for people to want to apply a "word" for this, such as "heel" or "walk", or "close". I never have done. I believe the dog is smart enough to realise that the leash itself is the cue. The only sound my dog hears is "ah-ha" if she ventures too far forward. Then she just slows down slightly and falls into place.
If possible, attach the leash to a belt or to your waistband. This will help prevent the natural urge to apply a pull correction on the leash with your hand, when the dog forges forward.
If you use this method
consistently, you will notice an incredible difference in your dog's loose leash within a week. But you have to be unforgiving in your demands. The dog will take its lead from you. If you show it's okay to pull ahead "sometimes", then that's what the dog will do.
Heeling
Heeling is different to loose-leash work primarily in the demands that it places upon the dog. The positioning (in both front/back and side distance) has to be precise, the position of the handlers hands is precise, as is the posture. Even the speed at which the handler walks with the dog has to be practised.
I'm reluctant to write too much about this, as I don't know which country you're in and kennel club rules vary from country to country. For example, here in the UK, dogs walk literally right next to the leg, whereas in the US, I gather points would be deducted for "crowding" if that happened. I also believe the rules are different in terms of hand position for the handler.
I'm also not sure if the dog *has* to be looking up at the handler and paying attention in the US, while heeling.
Before detailing how to train for heeling, I would strongly recommend that you practise getting the dog to an "in" position, which means sitting tight in to your left leg. What I then do, for starters, is just turn around on the spot in 90 degree turns, and encourage the dog to turn with me, but all the while maintaining a close "in" position.
You should do this by luring with food treats to start with. (Hold the treat in your left hand, at waist height to encourage the dog to look upwards throughout.) If your dog only does one successful 90 degree turn in a day, so be it. It's one more than it did yesterday.
Be generous with the clicker and the treats. Eventually, the dog will turn around with you in full circles, staying tight to your left leg, and looking up at you at all times. Once you have that mastered, you're ready to begin heel-work, and not before, in my opinion. After all, what chance have you got of keeping a dog in position on the move, if you can't do it just turning on a single spot?
For the record, I use the word "In", for the above. So each time I do a turn, I say "In". Eventually, you'll be able to stand in any position, say "in", and your dog will just get in the right position.
Hopefully, someone with experience of US Competitive Obedience rules will see your post, and fill in the blanks.
What I will add is that competitive heel-work is exhausting, for both dog and handler. The dog isn't expected to maintain it for long periods, as it requires such an amount of focus. I personally find it to be the most physically exhausting thing to train too.