This is what horologists call a balance staff.  It's an axle for the wheel that regulates the timekeeping qualities in a mechanical watch. This version comes from a more recent development in the technology and is from a "lever" escapement. 

watch balance staff on a penny

As always, these images work best if you have a penny handy and can put it in your hand for reference.  It is often difficult to gain a proper perspective of just how small this machine work is.  Holding a penny as you look at the images makes the point right away. 
The problem with these is that the balance wheel is disproportionally heavier in relationship to the pivots that hold the wheel steady in the bearings.  The earlier versions had no shock protection at all and many of the older pocket and wrist watches would need these shafts replaced anytime the watch was received a shock of some kind.  Some took maddeningly little shock to snap off a pivot and stop the watch from running.
In school we made up staffs from scratch.  We learnt to harden and then temper the steel to be able to cut it with a carbon steel graver. The gravers were simply engraving tools about 3mm square and sharpened corner to corner at an angle.  The lathes that we use to do this type of machining are collet lathes.  I'll leave you to a search engine to learn about the various types of machine tools.  The little ww collet lathes that are common in watchmaking are used in similar fashion to a wood lathe in that there is a "T" rest and the cutting tool is hand held.  

ww collet lathe Derbyshire

It wasn't until 1994 that I bought a 12"x24" tool room lathe and received the benefits of dials and gauges to determine how much material was set to be removed.  My engine lathe won't do this type of watch work though, but I don't need it to.  It is very useful in clock work.

12" x 24" machine lathe

The Swiss invented a system to protect the fragile pivots from breakage and consequently they don't break very often any more.  When they do, it's often from a looky loo poking around inside the watch or a mechanic that's made a mistake.  Through my apprenticeship, I drove my Dad mad breaking pallet staffs which are smaller.  I broke my fair share of balance staffs too trying to learn to be careful enough.

watch balance wheel inverted

The poise and true running in the flat and round of the balance wheel is important to the timekeeping.  When replacing a broken staff, it's to every one's advantage to leave the relatively soft balance wheel untouched.  Taking out the shaft that has been firmly riveted to the wheel without damaging the wheel is a delicate maneuver.  Arguably the best way to achieve a clean exit is to cut the support hub from the bottom of the shaft.  When done well it's a brilliantly clean way to remove the staff without putting the riveting edge of the wheel at risk.  Here's an image of a nasty rusted shaft after removal.  You can see the little ring that is all that remains of the hub after I cut it away from the bottom of the wheel.  

rusted balance staff removed with hub ring showing