My dog understands different meanings of the same word. For example, "out" can mean to go outside or to leave a room. "Up" can mean to get picked up, to stand up, or to climb the stairs. She doesn't get them confused. It can't be all context because if she is in the kitchen there is an equal chance of "out" being either of her known meanings. But she knows which one we mean.