Do you a trailer brake controller already on the truck?
Are you going to use a 6 pin round (standard utility trailer with brakes), 7 flat pin (RV trailer) or 7 pin round (Semi trailer) connector? If you plan on a winch and backup lights, I would recommend one of the 7 pin connectors. If not, the 6 pin works well.
Here is the information on the connectors. They do not show the semi trailer connect, but it is the same as the 7 pin rv except it uses round pins.
http://www.etrailer.com/faq/wiring.asp
As far as the trailer, that is easy. Take the two wires from each brake, connect one to ground. The other wire is tied with the opposite brake and run to the front of the trailer. Also, the standard wiring for 6 and 7 pin has a ground. Run a wire from that pin to the frame on both the truck and trailer, use a star washer between the terminal and frame. If you skip this step, your depending on the hitch to make a good electrical connection.