Search Engine Optimization is the science that is applied to a website's internal structure, keywords, and content so that Google is able to crawl your website and index it under the proper category and geographic location(s). Once a website has been crawled and indexed by Google then it will show up in the organic listings for searches that your website and content can satisfy.
To master the Search Engine Optimisation you need to understand the following:
What do people search for'
How do people search for it (what keywords)'
Google among others, provides us with a long list of tools that help us understand the search habits people have while making searches on the Internet.