A class is a structural and functional description of an object.
An object is an actual existence (instance) of that class. Different instances can have different structural features, but they all carry out the same functions basically.
Hence when you want to create a Book, you first create a class Book which has a variable called author, nameOfBook, category.
class Book
{
String author, nameOfBook, category;
Book(String a, String n, String c)
{
author = a; nameOfBook=n; category=c;
}
}
And then you create different objects of this class, such as
Book b1 = new Book("Peter van der Linden", "Just Java 2", "Software");
Book b2 = new Book("Carl Segan", "Contact", "Science Fiction");
Thus each object will be structurally similar but can have a different state, but will exhibit similar behaviour, since they all belong to the same class.