Use a stud finder to locate the ceiling joists in the area where the lights are being installed, as well as the location of the studs on the wall where you're installing the light switch.
Trace the outline of one of the lighting cans onto the ceiling at each location where the lights are being installed. The lights are placed between the ceiling joists. Cut a hole into the ceiling at each spot with a drywall saw.
Hold an old-work electrical box onto the wall between the studs where you're installing the light switch. Trace the outline of the box onto the wall, then cut a hole in the wall with the drywall saw. The old-work box is designed for use in a room with finished walls; a new-work box would be used in a room without drywall installed.
Run pieces of 12/2 electrical cable between the location of your main electrical panel and the hole for the light switch, the light switch and the hole in the ceiling for the first light, and between each lighting hole. A 12/2 cable has three 12-gauge wires inside the sheathing -- one black wire, one white wire and a bare copper wire.
Prep the wires for the lights by removing two inches of sheathing from the cable with wire strippers, then removing one inch of insulation from the black and white wires inside the cable.
Connect the wires from the lights to the electrical cables, following the instructions for the Halo model you purchased. Many Halo recessed lights have a junction box that extends from the side of the lighting can, so you'll remove the cover plate from the box and connect the wiring inside it. Connect the black wires together by twisting the ends two or three times with a pair of pliers, then placing a plastic connector cap over the wires and twisting to tighten it. Repeat this with the white wires and the ground wires, then replace the cover plate onto the box.
Insert the junction box into the ceiling, followed by the lighting can. Place the bottom edge of the can over the opening, then pop out the tabs on the sides of the can. These hold the can in the ceiling.
Install the rest of the lights in the ceiling using the same method.
Punch out the knockout hole on the back of the old-work box for the light switch, and slide the two cables inside the wall through the knockout hole. Place the box in the hole you cut into the wall, and screw it to the wall.
Bend the ends of the black and white wires in the cable into a hook with the pliers. This makes it easier to connect the wires to the light switch.
Unscrew the terminal screws on the sides of the light switch until there's enough space to fit the wires. Hook the black wires onto the brass screws and tighten them, then connect the white wires to the silver screws and tighten them.
Cut a piece of bare copper ground wire three inches long from the leftover cable. Connect one end of this wire to the ground screw on the bottom of the light switch.
Twist the ends of the ground wires in the cables together with the end of the three-inch wire that isn't connected to the light switch by giving them two or three twists with the pliers, then placing the connector cap on them.
Tuck the wiring inside the old-work box, then place the light switch into the box and screw it to the wall.
Screw the plate cover onto the wall, and install the trim and light bulbs onto the lights.
Hire an electrician to inspect the circuit and wire it into your home's main panel. Most municipalities require that a certified professional do this due to safety reasons.