• TempDB can hold a variety of information.

    Work Tables for Groupby, order by, and union queries

    Work Tables for Cusor and spool operations

    Work Tables for creating/rebuilding indexes that specify the "sort_in_tempdb" option

    Work Tables for hash operations

    it also contains the Version Store which manages for the instance

    Online Index Craion, online index rebuilds

    Transactions runnin under snapshot isolation level

    Multiple Active Record Sets

    ...and I'm sure there are a couple things i've missed

    http://technet.microsoft.com/en-us/library/cc966545.aspx

    How to shrink the TempDB

    as you can read below the dbcc shrinkdatabase (tempdb, 'target percent') command only works if there is no activity against the tempdb while the statement is executed

    http://support.microsoft.com/kb/307487