You have a slot in the axle usually either 1/4" or 3/16" wide, and a slot in the sprocket.
You then have a piece of keystock which is a piece of square bar the size of the slot, which fits into the axle so the sprocket/wheel/ whatever you have can slide onto it, and when power is transferred through it it will spin with the axle instead of independantly.
Rob