It rolls according to its weight, laws of physics and gravitational pull.
Let's say you have an acorn. You lay down the acorn on a flat surface, and then roll it across the surface. Would it roll in a straight direction or in a circular direction? If the acorn rolls in a circular direction, how?
If the cap (or by the scientific name, cupule) is on, it will go in a circle. Since the cap is bigger it will take a longer length to do a complete revolution than the smaller nut part, causing the nut to go in circle.
Most acorns tend to be of a cone shape rather than a cylinder shape and roll like a cone would roll on a flat surface.