“We do our best to keep the details of the search algorithm confidential to make the ranking system as fair as possible for everyone.” -Google
Google will never directly reveal how their algorithm works… but in this article they highlight some important factors https://support.google.com/business/answer/7091?hl=en