Training contacts is all about ensuring your dog puts at least one foot in the yellow at both ends of an obstacle and to ensure safe performance of the obstacles. The contact zones are the yellow areas and are a specific depth designed to prevent the dog from jumping from an unsafe height. Giving all the details would be a small book but I'll try to give you enough to get started.
The answer from here down is for 2 on -2 off contacts. There will be a different answer for other styles. The 2 on -2 off stopped behavior is not required by the rules for competition. I use them because the trial experience is very exciting for the dogs and I have a breed that tends to "bail" (leave the contact before the yellow) when they are excited. A stopped contact also allows you to get ahead of your dog to direct them to the next obstacle. That's one reason they are popular, especially on the dogwalk.
When training them, start at home on stairs or a perch (phone books work nicely, you can wrap them in duct - tape). Clicker training works very nicely for this but if you don't like clicker training you don't have to use it. Do not use a cue at this point. Here is a good video that shows how you can work them at home.
Once your at home performance is about 80% reliable start doing the same thing away from home. Parks are a great place to practice because they offer a lot of distractions.
At this point you can start training on a travel board, a flat A - frame, or one of the ends on a dogwalk lying flat on the ground. When you get about 80% reliable performance then you can make it harder by running with the dog into position, doing it in different places (this is what a travel board is for), and creating challenges for the dog where you are running slightly ahead or behind the dog. You can also start practicing rear crosses at this point. The goal is to have the dog driving into position with speed.
It is very important that you never associate you stopping as the cue for your dog to stop or the release with a handler movement. This part deserves it's own separate question so I'm not going to attempt to include that here.
Some people use a clear plastic plate at the end with a treat on it to help the dog drive into position. I prefer not to include the plate because you have to phase it out.
There are several games you should start playing at this point that you can find here.