A Puppet class is a reusable block of Puppet code that can be used to define a set of related resources. It is used to create a group of related resources that can be easily managed and configured.
For example, a Puppet class could be used to define a web server with Apache, MySQL, and PHP installed. The class could define the installation of Apache, MySQL, and PHP, as well as the configuration of the web server. This class could then be used to deploy web servers in multiple environments with minimal effort.