It's actually pretty simple. There are two wires on each brake, a hot and a ground. It doesn't matter which is which but I like to have both grounds in the same location on each brake, the same for hots. All wiring should be run on the underside of the trailer rather than in the floor. Repairs and testing are much easier that way.
Note: your trailer may already have brake wiring in place. Look for a thicker cable with connections to the brakes.
The two brake wires are usually 12 gauge inside a sheath or jacket. It is called 12/2 brake cable and you can buy it at most shops that carry automotive wiring. Connect the white wire to each brake ground and the red (or black) wire to the hots. The cable runs from the door side brake across the axle to the street side brake. You will have connections at the street side brake; I use heavy duty water resistant wing nuts. From the 2nd brake, run the cable to the front of the trailer, clipping to the frame as you go.
In other words, right brake, across the axle to left brake, then forward to the tongue.
I use a 7 way junction box near your tongue for connections. The 7 way cord is clamped into that with each of the 7 wires exposed in the box. Tow wiring goes into the box, as does brake wiring.You will need a very good ground on the trailer frame for the lights, inside 12 volt system and brakes. I bolt thru the frame and connect the main ground with a ring terminal. You can also use the same bolt for the other grounds, with at least one into the 7 way J box.
There are several tutorials in our 12 volt and towing section (photos and diagrams) on wiring 7 way systems.