Set in Boston, Good Will Hunting is about Will Hunting (Matt Damon), a young man who immersed himself in books to release his anger and frustration with his abusive foster family. Will and his friend Chuckie Sullivan (Ben Affleck) are two drifters who hang out together with their friends, drinking and fighting in Southie. Will works as a janitor, construction worker, auto mechanic, and in other low-end jobs, hiding his talents for memorizing facts, solving complex math equations (including Parseval's theorem), and aptitude for knowledge and understanding.
Will and his friends pick a fight with a man who had picked on him in kindergarten, an act for which he is arrested. During the few days he is waiting for his trial, he meets Skylar (Minnie Driver) at a Harvard bar and she gives him her phone number. Gerald Lambeau (Stellan Skarsgård), a mathematics professor at MIT, discovers Will's talent and decides to help him turn his life around. One of the conditions to keep Will out of prison is that he must see a psychiatrist regularly. After unsuccessful attempts with several psychiatrists, Gerry takes Will to meet his former college friend and specialist, Sean Maguire (Robin Williams).
After a rough start, Sean concludes that Will's defensiveness is the result of years of abuse and violence. The two work together to break through Will's barriers and expose his true thoughts and feelings. Lambeau attempts to push Will to excel in his direction, not seeing that Will is a sensitive being who can easily snap when pressured. Skylar asks him to move to California with her. In a tense emotional scene, he refuses and leaves her.
At the end of the movie, upon reflecting on his options and current path in life, Will decides to go with his heart by following Skylar to California instead of continuing his life in Boston, thus setting aside the opportunities Lambeau offered him to win Skylar back first. Courtesy of http://en.wikipedia.org/wiki/ Good_Will_Hunting)