If you create a website and upload it on to a server somewhere and point a domain name to it but do nothing else, that website will not be indexed by the search engines. There are reckoned to be a huge number of websites on the internet that have never been indexed (also known as crawled because of the spiders that do the crawling - don't ask - another time). For a website to be crawled it has to be found by a search engine.
Well if the search engine is indexing one site and it finds a link to your site, it will become 'aware' of your site and pages will begin to appear. Or you could actively tell the search engine about your site, a process known as search engine submission.
With some search engines, submission is not such a good idea. Over the years there has been a constant war between website SEO'ers and the search engines. This has been a healthy war for both sides. In the early days it was very easy to trick the search engine and end up with your site in the #1 position even if it was rubbish compared to the sites below. So the search engines gradually got better at ranking the sites on different factors using different algorithms that made it harder to 'game the system'.
Of course it's still possible. But it's probably fair to say that ultimately search engine rankings will reflect the real value and quality of the site.
However, it's still important to do the right things for SEO to get a good ranking and this means helping the search engine understand what your site is about so it can better match it to what someone's searching for. One way of doing this is through a site map. A sitemap is an XML document that you can upload along with your website and it tells the search engine all about the structure of your site and how you would like it indexed.