Auto correct works by using a dictionary database and grammar rules to identify and correct errors in real-time as you type. Advanced auto correct tools may also use machine learning and natural language processing to improve accuracy and suggest contextually appropriate corrections.