The United States Patent and Trademark Office (USPTO) is a federal agency responsible for granting U.S. patents and registering trademarks. It plays a crucial role in encouraging innovation by providing inventors exclusive rights to their inventions for a limited time, thus promoting investment in research and development.