If an patent examiner determines that one or more of the claims in a patent application are not allowable under the law, the patent examiner will issue a rejection in the form of an Office Action.
After you submit your patent application to the United States Patent and Trademark Office (USPTO) it will be assigned to an examiner who will review the application, and in particular, your claims against the prior art. A substantial majority of patent applications that are filed with the USPTO receive at least one Office Action rejecting one or more claims of the patent application for a variety of reasons.
When a claim receives a rejection, it does not mean that the invention itself is not patentable, but rather the claims as they currently stand are rejected. It is entirely possible that the invention described in the specification of your patent application is patentable, but that the claims themselves need to be adjusted. Rather than being deterred by a rejection, it should be viewed as an opportunity to better define the scope of patent protection for your invention.