User Par, has given me a great answer to the question.
I know that I wrote a poorly asked question, and now understand that I should ask about machine learning. I thought there was some deep mathematics behind the ability for a computer to grade an essay; I was wrong. What I want to ask about is the mathematics that allows computers to learn. The only term I knew before Par gave a great answer, was AI. Searching for AI on the internet, mostly tells me about a movie with Will Smith. I know this is not a detailed mathematics question about some function; however, I don't really know where to start to read about the mathematics that is used to make computers learn.
Nowhere reputable will use a computer to mark an assignment that is qualitative (e.g. an English essay).
Computers are frequently used to mark homework in these scenarios:
Sometimes, machine learning techniques are used to verify if a student has plagiarized (e.g. http://www.turnitin.com/).
Also, this is off-topic (-1).
Edit: Removed my downvote in response to the author's clarification.