Mark two spots on your ceiling joist from which to hang the swing. If the swing has two chains or ropes, measure the approximate distance between them and make the appropriate marks on the joist with a pencil.
Drill pilot holes in the location of each of your pencil marks. The drill bit you use for the pilot holes should be slightly smaller than the eye bolts you use. An effective way of gauging the size of the drill bit is to hold it in front of the shaft of the eye bolt; if you can still see the shaft's threads on either side of the drill bit, the bit is the correct size.
Screw the eye hooks into the pilot holes you previously drilled in the ceiling. Use a pair of pliers to tightly fasten the eye bolts into the joist.
Hook up the chains or rope to the eye bolts after adjusting the height of the swing. The way you hook up the chains or rope depends on the swing's design. If the swing uses chains with C clamp-style fasteners on the ends, for example, tighten them around the loops on the eye bolts.