Curtis leads a revolt of the back end passengers against the front end passengers of a perpetual motion train where survivors of a global disaster, where the world has frozen, live. He discovers along the way that the social structure was on purpose but cannot tolerate it and won't perpetuate it any longer. Namgoong and his daughter, who have been helping Curtis and the other tail-enders, help him to save a kidnapped child and blow up/derail the train. Namgoong's daughter and the child survive the crash and see polar bears outside the train in the snow while Namgoong and Curtis have sacrificed themselves to save the daughter and the child.
A little longer:
The Snowpiercer is a train with a perpetual-motion engine with people who live on it due to a disaster caused when authorities tried to combat global warming with an experiment -- the resulting disaster is a new ice age and almost all life on Earth, except those that live in the train, die. It runs on a large circular track and the passengers have been on the train for many years.
Curtis (Chris Evans) leads a revolt of the tail end passengers (the lowest ranking people in the train society) against the front end passengers (the further to the front, the more elite). The passengers of the tail end are overcrowded and fed protein blocks (that look kind of like jelly). Curtis receives messages in the protein blocks periodically to help coordinate the revolt.
Curtis and Edgar (Jamie Bell) fight their way through several cars, as does Tanya (Octavia Spencer) as early in the film her son is selected and taken to the front of the train - without explanation - and she is concerned that her son and another child taken will be eaten or something terrible has happened to him. Curtis and Edgar break out of the "jail car" (it appears they store people in drawers) a man named Namgoong Minsu (Song Kang-ho) and his daughter because he designed the doors and can help them through; the two are addicted to this waste by product they sniff to get high. (They discover along the way that the protein bars are made of ground bugs - eeeeew - but not everyone sees so they don't spoil it and still enjoy eating them.)
Curtis captures Minister Mason (Tilda Swinton) but Edgar is killed in the fray. He says he'll spare her life if she takes him to the front of the train. They get into a school car and the children and teacher act a little kookie-brain washed (they have a weird movie about Wilford and his train engine and it's weird)... and eventually, the pregnant teacher draws a machine gun on them and Curtis' mentor back in the tail is killed Gilliam (John Hurt). Curtis kills Mason.
As Curtis and Namgoong and Namgoong's daughter press forward, more and more of their people are killed, until they reach cars will elite revelers who are eating and partying and using the drug. Namgoong and his daughter collect a bunch of the drug, filling their pockets, and as they come to the Engine door. They also steal some coats from the elite passengers as they make their way to the engine car. Along the way, Namgoong looks out a window with his daughter and they see a plane that, he says, is less snow covered -- leading him to believe that they can leave the train and live out in the world again, as it appears to be warming up.
Curtis explains that he must get into the Engine car -- when he and the other tail inhabitants first got onto the train there were no protein blocks or food of any kind and they were forced to cannibalize each other. He says that he stole Edgar from his mother - and killed her - in order to eat Edgar because babies tasted best. It was then that Gilliam cut off his own arm and offered it him in exchange for the baby. It was then that things changed, and soon after, the protein bars so they wouldn't have to eat each other. He must confront Wilford about it.
The doors to the engine car open and Namgoong is shot and Curtis forced into the car. Wilford (Ed Harris) is inside. He reveals why the children were taken -- because they are the right size to maintain the engine, he selects a couple, and then forces them into tiny spaces in order to clean out gunk in the engine. Wilford also explains that Gilliam and he came up with the class warfare as a means of population control -- but Curtis had been too successful and killed too many front-enders, hence why Wilford had Gilliam shot. Wilford explains that he's impressed with Curtis and wants him to replace Wilford but Curtis refuses. The daughter finds Tanya's son under a floor panel crammed into part of the engine and Curtis puts his arm in, breaking it/sacrificing it, so that she can pull the boy out.
Namgoong fights off some of the front enders and places the bomb but they are unable to close the engine car's doors so his daughter holds the little boy and Curtis and Namgoong block them from the blast with their bodies. The blast causes an avalanche and derails several cars of the train. The daughter and the little boy emerge from the train, unharmed, and above them on the hill they see polar bears.