Disclaimer: Ten year old spoilers of Inception ahead, read at your own discretion.
The real fun begins when the film ends. According to director Christopher Nolan, its ending was deliberately a 50/50 draw. The next decade saw an endless social war across backyards, campsites and living rooms as viewers debated Cobb's survival after entering four-to-five layers of dreams.
This leads to believing one of two branches of reality for Cobb: He's still dreaming. Of course, I'll also play by the movie's rules to tell you why it's all a dream: just as Nolan half-intended.
By re-watching Inception thoroughly with subtitles, it's important to note a few key terms, with these terms being used within other terms, within explanations.
Inception - The art of motivating someone to (100 per cent) willingly do what you want. Includes expert manipulation and planting ideas through extensive research of a target.
Architect - To have a dream in Inception, a person must be a "host" while anyone else can join in. These are called "Architects," who also fabricate the map and overall playing field, either from memories or rehearsed drawings. In their own dreams, Architects can also bend physics any time they want (i.e. the infinite staircase scene). Multiple Architects are needed to go safely deeper into another dream.
A good architect can also re-create a target's world without them knowing. The more detailed and realistic, the better. It's also why Cobb tests new Architect Ariadne (Ellen Page) to draw a maze that can be solved in one minute (in a situation where targets start to suspect they're dreaming after spending enough time around, thereby making Projections).
Projections - If a sleeping target suspects they're dreaming (and know they have uninvited guests), their brain triggers a defense mechanism to remove the guests. It can come in the form of a monster, an evil ex-spouse or heavily armed goons. Hilariously, guests can also create projections if they suspect it's a dream. For extractors and inceptors, this requires extreme discipline to suppress in jobs. If a bad Architect does a poor job re-dreaming a target's room, it can lead to targets freaking out. It also creates a risk of Projections killing a dreamer and sending them back into reality - or straight into Limbo.
Limbo - A cheesy wedding dance, and not waking up after dying in a sub-dream. The deceased goes into another layer of dream. But this one is filled with nothing, since no architect was there to pre-make a world for them. As Arthur (Joseph Gordon-Levitt) says, it's "unconstructed dream space." A person becomes trapped in their own dream - without knowing it (technically, dying). If a dreamer is heavily sedated by a drug in reality, dying means going into Limbo. This is shown with Saito'(Ken Watanabe) being the first to enter Limbo, and Eames (Tom Hardy) trying to wake him back up early on.
As subtly explained in the movie, Inception's dream machine (aka. the Portable Automated Somnacin IntraVenous device) is an experimental military prototype box. Like USB's linking other hard drives, the silver box can connect multiple people and bring them into an Architect's dream. Oh, the machine is also carry-able across dreams too! How handy.
So far so good? There's a catch to using the machine: it stops working after an amount of time as a safety feature. Obviously, the machine was made for only one dream at a time, while it's dangerous for the machine to stop when people are deeper. Essentially, it can cut people off from waking up if they aren't back at the first dream. Unless a drug could stretch the time (think melatonin on steroids, times 1,000).
This is why the team uses tricks across Inception - including music to remind everyone it's a dream and "kicks" to die and move back up a level. It's also why everyone keeps track of time, to make sure the machine doesn't cut everybody off.
Across Inception, Cobb's team returned to reality through timed "kicks" which killed them and sent them up a level. Under each dream, the architect stays in their map to make the "kick." Eames blew up the snow fort, sending the team back up. They continued moving through another perfectly-timed hotel explosion by Arthur. The team finally crossed the finish line when they woke up in a drowning car (the first dream).
The catch? While everyone woke up in the plane (reality), Cobb instead missed the kicks as they all happened. Fisher was the only one to escape Limbo, from Ariadne kicking him off a building - just in time for the kicks. This also plays the opposite way for Cobb, who stays behind in Limbo and goes even deeper.
He was abandoned by the team as he confronted Saito in the deepest part of Limbo. Though they tried "kicking" themselves, both wouldn't have a an Architect waiting for them to kick them back up through each level. If dying without an Architect sends a person back down, then Cobb would only be trapped in a cycle.
To extend the box's timer, this is where Chemist Yusuf (Dileep Rao) uses a sleeping drug. It's also laced with a very powerful sedative which keeps dreamers and targets unsuspected. But the compound is so powerful that dying in a sub-dream will send victims down instead of up. This plays a big part in Cobb's survival as he forgets he's dreaming, while his subconscious becomes lost. Yusuf's compound is what sends Cobb past the point of no return.
For Cobb, left behind in Inception's first dream, this leads to some loopholes. It's worth noting that the deeper dreamers go, the longer they can stay there. In Cobb's case, he is technically dreaming for a very long time in Limbo. The same can be said for Saito, who continued to be sedated in Limbo and remained there past the machine's shutdown and missed the main kicks. Both will continue to go down with every attempt to return.
Instead, Cobb went deeper into his own Limbo. As a self-Architect, his guilt and self-awareness fabricated a projection of his kids and world around him. Of course, Cobb's subconscious and memory of his Inception job gave him the outcome he wanted.This "dream reality" still works as a happy ending, if Cobb completely forgot he was dreaming (remember, the deeper you go, the more dreams are believed as reality). It's also why the totem wobbled in Cobb's mind as he questioned dreams from reality. At the same time, it continued to spin long after Inception fades to black.
It's worth noting each of the ideas are connected. Every factor contributed to Cobb's subconscious living on in Limbo, while he was able to reach his own family by becoming his own Architect and accepting a new reality. The illusion of a reality is made more real when Cobb reaches the deepest level of a dream, thus making him unaware. Of course, it means Mal is completely gone from Cobb's success of the Inception job - and knowing to a degree it's all over.