Two things - the way that the molecules pack together and the number of different conformations that the molecule can assume.
If you try to pack a bunch of branched chain alkanes together, you will find that the branches get in the way. Since the only forces holding the molecules together into a liquid and preventing them from dispersing into a gas are the London Dispersion forces (or van der Waal's forces), they are held together best as long straight chains, and any branch will interfere with the packing. Small rigid circles are probably the second best at packing. Consider how tightly you can pack a bunch of strings into a rope, and how tightly you can stack a random pile of coins. Branches on either will disturb the packing.
However, the cycloalkanes are always tied into a relatively rigid circle, while the straight chain alkanes are not always straight lines. They are free to rotate at every carbon atom, and the barrier to rotation is very small at room temperature. Consequently, you aren't considering packing a bunch of thin strings into a rope, but a bunch of randomly bent nails. These do not pack as well as the small rigid circles, and the forces holding them together aren't as high. So it is easier to pull the molecules of the straight chain alkanes apart to form a gas than it is to pull the cycloalkanes apart, and the straight chain alkanes have a lower boiling point and melting point.