All planetary and stellar systems are born from the collapse of dense interstellar clouds. The clouds may originally be very large (even thousands of light years across). Consider a portion of the cloud the collapses from a size of a light year or so to the size of the solar system. That is a huge change in the size of the system. So, the very slight rotation that the cloud has in the beginning is increased dramatically when the collapse takes place. In fact, this is one of the barriers in star formation: there is excess angular momentum and there has to be a way of losing angular momentum before you can form a star.
Anyway, the bottom line is that stars like the Sun spin from the original angular momentum that was there in the solar nebula from which it formed. Not only that, all orbital motion of the planets (including the spin) is due to this orginal angular momentum.