What are controller extensions and when would you use them?

Controller extensions in Visualforce extend the functionality of standard or custom controllers, adding custom logic or accessing additional data. They are defined using the “extensions” attribute in the <apex:page> tag. For example, an extension can add a method to retrieve an account name and a custom action to save the account and redirect to its detail page.