I didn't ride at all for 10 years, and when I got on a two-wheeler again for the first time I thought I was going to fall right off it. They say you can't forget how to ride a bike, but I almost did.
But after a couple of years tooling around for very short distances on a hybrid, I went to a retreat and rode a demo road bike. Several of the leaders (experienced triathletes) commented on how good my form was.
So: it comes back, pretty quickly, even after a long break. No, I'm not as smooth as I was when I was racing, not by a long shot. But your body remembers where to put your weight, how to move your legs straight up and down rather than around in circles, etc.
I'd say that getting it to begin with comes from doing form work - being conscious in your body of what your body is doing.
Speed comes from what you put behind you. - Judi Ketteler