Site search solutions first go through the process of indexing your site's content. This means they extract all the text from your pages and store it in a searchable format. The indexing system of most search solutions breaks down the text into smaller units that are quicker to search.
Once they index the content, they make it available for search. When a user searches for a query, the site search solution will look through the index and return the results that match the query.