The websites that Google ranks on the 1st page of of its search results for any given search term are the ones that they consider to be the most relevant and useful. They determine which websites are the most useful and relevant by using a complex algorithm (mathematical process) which takes into account 200+ factors.