Let's first look at laminar and turbulent flow. When an object moves through air, the air molecules directly at the surface of the object will get carried along courtesy of viscosity. Viscosity causes adjacent molecules to assume the same speed, so there will be a layer of air surrounding the object in which the speed transitions from the object's speed (right next to the surface) to the speed of the outer flow. This is the boundary layer. Initially, the layers of air within the boundary layer show no cross movement of molecules. Compare it with a multi-lane road with bumper-to-bumper traffic where no car changes lanes. Since all molecules move along their layer of air, this is called laminar flow (lat. lamina = layer). Drivers who stay in their lane are like air molecules in a laminar flow. They follow a straight path and interact with their neighbors to the left and right mainly through shear, which will change their speed only slowly.
How does roughness cause a turbulent boundary layer?
Roughness lets air molecules bump into peaks or get sucked into troughs which adds a perpendicular speed component. Normally, the motion of the flow is expressed relative to the object. This will make the molecules close to the surface the slow ones. Now you have faster molecules from more distant layers moving closer to the surface and kicking the slow ones there ahead, and slower ones from close to the surface moving away, slowing down the more distant layers. So air molecules in turbulent flow wiggle around all the time and bump into slower molecules, or get bumped by faster ones. This makes all of them assume the same speed, more or less. Only at the surface you find a strong speed gradient, maybe like at an onramp on a highway. The slow cars entering the highway speed up really fast when others will cut into their lane frequently.
What does the boundary layer look like?
Below you see two typical speed profiles, where the speed $u(y)$ increases as you move away from the surface (at $y = 0$). Left is laminar flow and right the turbulent variety.
Speed profiles of laminar (left) and turbulent (right) boundary layers. Image source.
In still air every boundary layer starts laminar. Inside the laminar boundary layer, small disturbances become less and less damped, and at some point some frequencies become unstable (see Tollmien-Schlichting waves) and will eventually create so much cross movement that the boundary layer becomes turbulent, even without roughness. How soon it transitions to a turbulent boundary layer depends on (besides roughness):
If the flow is accelerated, all speeds in flow direction increase while cross flow will not be affected, so a laminar boundary layer in accelerating flow is stabilized. On the other hand, a pressure rise in flow direction corresponds to a deceleration in flow direction, so any movements perpendicular to the flow direction will grow relative to the flow speed, and as a consequence the turbulent transition occurs rather quickly.
Why does turbulent flow "stick" to the surface longer?
Flow around a three-dimensional object will accelerate in the forward region and decelerate where the object's cross-section contracts again. Since the energy transfer across the stratified flow in the laminar boundary layer is reduced to shear, the molecules close to the surface will lose speed quickly once this deceleration starts. Soon the flow close to the surface comes to a rest relative to the surface and starts to flow backwards. This allows the outer layers of the flow to move away from the surface of the object because the space between them and the surface is now filled with slow-moving air. That is called flow separation.
The much higher energy transfer in a turbulent boundary layer will delay separation because the slow molecules close to the surface will get kicked along. Now the flow is able to follow the contracting contour of the object for much longer and separation is delayed.
Note that the golfball effect only occurs in a small range of speed and size combinations, because with bigger objects or at higher speeds the laminar-turbulent transition will have occurred already before the deceleration starts.