Plugins work by extending the functionality of a website or software application. They do this by adding new code to the existing codebase. When a plugin is installed and activated, it integrates with the CMS and can be accessed via the plugin settings page.