An Index is a list of URLs that is collected by search engines, ranked in order of priority & returned to users when they submit queries as results on the Search Engine Results Pages (SERPs).
When bots crawl the web following links they keep track of each URL that they encounter (unless directives tell them not to).
These links are all assigned to different keywords & queries & assessed a relevance score to each based on on-page content, backlinks pointing to each URL & other factors.
The ones that have the best detailed content & tags, with the most high quality backlinks & good speed & user experience are ranked at the higher end of the index.
This is what leads to the results that you are shown on the Search Engine Results Pages (SERPs) when you submit a query.
Indexes are constantly changing, due to algorithm updates that change the importance of input criteria, as well as due to optimizations & content creation for sites that they encounter.
Always be sure that any content you want to appear in search is not being blocked by your directives from being indexed & vice versa.