So android goes out of its way to build this nice UI guide for everyone to use. But I don\'t see anywhere where it shows code examples of how to build these elements.
The tabs you need are part of the ActionBar. Specifically they are displayed when the ActionBar is in Navigation Tab mode.
http://developer.android.com/guide/topics/ui/actionbar.html (see under "Adding Navigation Tabs")
You may want to use www.ActionbarSherlock.com which is a library that will give you the ActionBar on nearly all versions of Android. It works the same as the official one, and includes the tabs.
Do not use the TabActivity any more, it's old and being deprecated. ActionBar is the future.