Search engine crawlers are not real spiders, but software programs which check your site and take a copy of the text from your site into their servers. This process of 'grabbing a copy and storing(job of a crawler or a bot) and sorting the data in search engine servers' is called as Indexing.
Content can also help. Make sure your content is original and add new content on a regular basis too.
Its an algorithm,to find relevancy of an indexed page based upon its keyword frequency and proximity.