When you apply for a patent, you have to file a description of your invention, called a specification. The specification has to be detailed enough to let other people understand how your invention works and how it can be made.
The specification normally starts with a description of the problem which your invention solves and what other people have done in the past in their unsuccessful attempts to solve the problem. This is called the prior art.
The specification then contains a summary of your invention, followed by a detailed description, usually including drawings, with numbers in the drawings pointing to each of the features of your invention. If your invention is a chemical or something that can’t be represented visually, the drawings can be omitted.
The specification also includes claims. The claims are the most important part of the specification, defining exactly what you are claiming as your invention. Each claim is a single sentence, often quite long and divided into paragraphs.
The invention defined in each claim has to be new when compared with anything anyone has ever done before anywhere in the world. Standard patents can contain any number of claims.
As well as defining what is new about the invention, claims also define what an infringement of the patent would be. If your competitor is doing all of the things defined in any one of the claims of your patent, then your competitor is infringing the patent.
So the art of writing patent claims involves making sure the claims are narrow enough that they don’t cover anything that has been done before, while at the same time making sure they are broad enough to cover anything that your competitors may want to do when copying your invention.