go to this address and you can see a animation of how a shaft drive works. this is one on a bicycle but the only difference is a motorbikes is larger and its a engine powering it instead of pedals. the engine turns 1 cog which turns a pole which inturn rotates a 2nd cog which is attached to the rear wheel giving you forward motion.
http://www.dynamicbicycles.com/Animation/dynamicpopup.html