This tutorial shows you how to create a working piston in Maya. The key is to use constraints so that as one piece moves, the others move accordingly. Even if you don't want to make pistons, this is a good constraint example(something essential to creating skeletons and rigging characters).
Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.