You ask a difficult question! A lot of people have different opinions about this, and as the film continually skirts the line between awake and asleep, there is a lot of ambiguity that is left for the viewer to resolve.
The best clues to the logic of Inception can probably be derived from the interview between Christopher Nolan and his brother Jonathan, which can be found in the book Inception: The Shooting Script (Insight Editions - you can read it in part at the link to Google Books).
Christopher recalls being in college, when he would get up after a couple of hours of sleep, go have breakfast, and then come back and sleep some more. This after-breakfast sleep was different - he calls it active dreaming (also known as lucid dreaming) - when you realize you are dreaming and take control of the dream. This got him interested in the "infinite potential of the human mind." He talks about how in dreams we create whole worlds and we think we are having conversations with people, but we are actually putting the words in the other person's mouth.
Inception ...is about a more everyday experience of dreaming...It
doesn't question an actual reality. It's just saying, "Okay, we all
dream every night. What if you could share your dream with someone
else?" And it becomes an alternate reality simply because the dream
becomes a form of communication - just like using a telephone or going
online. I wanted it, then, to have a rule set, a set of reasons that
you could graph for why it's not chaos and anarchy - for why it has
to be order, and why you need architects and an architectural brain
to create the world of the dream for the subject to enter.
The story is moved along by the mind's conflicting tendencies to create structures to defend itself and protect information and also to leak secrets when worried.
There is a hand-drawn diagram in the book "detailing the team's path through the various layers of the heist dream , and their subsequent 'kick' back to reality." Here it is in part: