Temporary tables are impermanent table objects created in the tempdb system database. There are two types: local and global. A local temporary tables, where its identifier starts with one #, is only visible within the connection session where it was created; it will be automatically dropped when the connection is closed. A global temporary table, whose identifier starts with two ##, is visible across all connections and is dropped when all connections are closed (so when SQL Server is stopped).
Local temporary tables are useful as intermediate constructs in involved scripts or stored procedures (although table variables are another option), as they can increase performance by allowing control over how some operations are performed. They can also be used to pass sets of data from a higher tier to the database tier (see my posts on this thread).
Global temporary tables are useful for holding state information and for passing sets of data from one application to another.