Object Colistion Help

This is kind of hard to explain, but im sure you will understand
(I hope :} )

I’m trying to make a tile based platform game.
I have all the physics (hope it spelt right) and stuff workin, and i can get my guy to walk on across the tiles,

BUT HOW CAN I MAKE HIM STOP IF HE HITS THE SIDE OF THE TILE!!!???

this has been buggin me for a while, and i hav tried lots of differnt ways, but none have really worked.

Have you got any ideas, or scripts you could give me.

Thx.