How does Google's 'showing results for' work?
First of all, no one knows how google search works except what google officially publishes. But I give you a simple algorithm for query correction (I have implemented this previously in production).
It is a simple prediction based on spell-check. First you detect the (possible) typo. Then you find the query which maximizes the likelihood. This search is done in the huge database of user queries plus some language models.