Update 8/19/15: Extending Version Control is another good source of examples to get you started, as is Extending Work Item Tracking if you are looking for Work Item Tracking API examples.
Update 8/14/15: With VS/TFS 2015, we’ve begun making the client object model available as a redistributable NuGet package.
Over six years ago, I posted a sample on how to use the version control API. The API changed in TFS 2010, but I hadn’t updated the sample. Here is a version that works with 2010 and newer and is a little less aggressive on clean up in the finally block.
This is a really simple example that uses the version control API. It shows how to create a workspace, pend changes, check in those changes, and hook up some important event listeners. This sample doesn't do anything useful, but it should get you going.
You have to supply a Team Project as an argument.
The only real difference in this version is that it uses the TeamFoundationServer constructor (in beta 3, you were forced to use the factory class).
You'll need to add references to the following TFS assemblies to compile this example.