The axle is what keeps both halves of the yo-yo together. Originally the yo-yo would spin freely on the axle in the string loop. After the invention of the transaxle sleeve and the ball bearing, the transaxle or bearing sits on the axle to reduce friction, making for longer spin times to allow for more complex tricks.
Most modern yo-yos feature a 'take apart design', enabling the player to separate the yo-yo halves in the event of a knot around the axle. This is done by unscrewing the bearing from one of the halves. Older yo-yos simply have the yo-yo halves glued together so the yo-yo is referred to as 'one-piece'.