Autodesk provides a software developers kit (SDK) for Revit and a lot of their other products. This is probably the best starting point. It will introduce you to the API. Visit the Autodesk Developers network to download. http://usa.autodesk.com/adsk/servlet/index?id=2484975&siteID=123112
You'll find exercises for writing macros which is the typical starting place.
Another great resource is the building coder blog. Jeremy Tammik answers questions and posts incredible information regarding the API on this site. http://thebuildingcoder.typepad.com/