A creature occupies all the squares of its space. The rules for moving through occupied squares depend on whether the squares belong to an ally or an enemy.
Ally: A creature can enter an ally’s space, but it can end its move in an ally’s space only if the ally is prone.
Enemy: A creature can’t enter an enemy’s space unless that enemy is helpless or two size categories larger or smaller than it. A creature can end its move in an enemy’s space only if the enemy is helpless.
Tiny Creatures: A Tiny creature can enter a larger creature’s space and end its move there, regardless of whether the larger creature is an ally or enemy.
Prone Creatures: A prone creature that ends up in the same square as another creature has two main options for moving itself out of that square: crawl or stand up.
Published in Player's Handbook, page(s) 283, Rules Compendium, page(s) 314.