Font subsetting - how it works and when to use

In order to reduce the file size PDF producers use a technique called font subsetting. What does exactly happen with the fonts and what are the consequences?