A class is a blueprint or a template for creating objects in an object-oriented programming (OOP). It defines a new data type with its own characteristics and behaviors. It is like a user-defined data type that encapsulates data (attributes) and methods (functions) that operate on that data. The class acts as a blueprint for creating instances of objects, which are specific instances of the class. It defines what data each object will hold and what operations can be performed on those objects.