Classes in programming languages are user defined data types. But they behave like built-in data types. Classes are used in object oriented programming paradigm.
Example of a class in C++ :
class person
{
private:
string name;
int age;
public:
void getdata();
void display
{
cout<<"Name: "<<name<<endl;
cout<<"Age: "<<age<<endl;
}
};
Here name and age are data-members of the data-type string and integer respectively. Keywords private and public are the access specifiers and getdata and display are the member-functions. A function can be defined inside or outside a class.
The terms encapsulation and information hiding are closely related with class.