Whenever you made some searches on Google you may think you are searching the entire internet. But you are actually searching the index of Google.
This means that even if the website is not live at that particular moment Google may still show the website in search results. This is possible because Google will show results based on websites that are present in the Google index AKA partially downloaded websites into Google servers.
Today you can find almost every website on Google.
How is this possible?
It's possible only because of Spiders. A Spider can also be called a Google bot, Crawler in SEO.
So what is Crawler and What it will do?
It's a simple bot designed by Google to download any website to Google servers. Most importantly it will also download the websites that are linked to the first website that Google finds. This way Google bot able to find all the websites on the internet and download them to their servers.
Only then Google starts to serve them or rank them in Google search pages.
Of course, Any website owner has the ability to control over Google bot to stop Crawling any pages on his website. But how you can control is an entirely different topic here. You can log in to the Google Search Console to control your visibility in Google search results.
This is the same case with all other search engines such as Bing and Yahoo.