Most 3D printers require you to have an STL (STereoLithography) file to print. You can design your object in any 3D modeling software, such as AutoCAD or any of the free software programs shown below. You can also use or modify a pre-existing file from a design library. If the 3D modeling software you use does not readily export to STL, you may be able to download a plug-in or extension that will do that for you. Or you can use another software program for that step.
Free 3D modeling software
OpenSCAD is free software for creating solid 3D CAD models - it might be the application you are looking for when you are planning to create 3D models of machine parts.
Tinkercad a browser-based 3D design platform, now part of Autodesk (free version available).
123D Design a free, powerful, yet simple 3D creation and editing tool from Autodesk.
List of additional free software packages from 3ders.com