Toenailing — driving a nail at an angle — is a method often used to fasten wall studs to the sole plate, as illustrated. If you have trouble keeping the stud in position while nailing, lay a 2x4 spacer block behind it.
Cut the block to equal the distance between the wall studs, typically 14 ½ or 22 ½ inches. Then screw a large steel handle to the top of the spacer.
Lay the spacer on top of the sole plate and stand the next stud up against it. Drive two nails at approximately a 55-degree angle down through the stud and into the sole plate. Remove the spacer and drive in a single toenail from the other side. Repeat the process for the remaining studs.