How SEO is done is complicated; what it does is not.
When the people looking for your products and services find your website near the top of the Search Engine Results Page (SERP) your website is considered “optimized” for the terms that were searched. The trick is to find the words and phrases people will put into the search box to find you. For example, if you are an attorney and never use the word lawyer in your website text, people who search for lawyer may not find your website. Internet searches have also become more sophisticated. People tend to use phrases and questions to define what they are looking for. For example someone who needs a Will might search: “Lawyer in Chicago who handles estate law.” If you are an attorney, and your website never mentions estate law or that you are in Chicago, your competitors will likely end up with this client.