Usually one of two things happens in these situations:
- You are moved one tile to the side instead of the tile you were supposed to arrive at.
- You just stack with the unwalkable object. Even though they are unwalkable, it's not strictly impossible for a player to be on top of them. For example, you can stay on top of a Trough if it's on the lower part of a ladder.
On some rare occasions, however, these kind of situation have led to server crashes. One that comes to mind are the doors in the Misguided Camp, part of the Cults of Tibia Quest. If you're under the door when the map changes, the door will close. This used to lead to a server crash, but now it actually teleports you to your hometown to avoid the problem. These are very rare though and probably not your case.