Like what Joachim47 said, if you have an Echo device in each room, you can group other smart devices together with that Echo.
For example, if your bedroom has an Echo Dot, and you have a smart light bulb and a smart AC, you can put all three things together in one group (via the Alexa app). In essence, the light bulb and the AC now belong to the one Echo Dot in your bedroom. So when you say, Alexa turn on the light (or turn on the AC), the Echo Dot knows that "light" only refers to the one light that belongs to it, which is the one in your bedroom and not any other light in the house. Same goes for the AC or any other smart device you choose to put together in one group.
However, if you are in the living room and speaking to a different Echo Dot and say Alexa turn off the light, Alexa will not know which light you are talking about. I'm not sure what happens in this case. It might ask you which light you want, or it might just turn off the most recently used light, or just randomly choose one on its own.