Let's just say your sprite is a 16x10 dude. He's walking from 0,0 sector of the map to 1,0 of the map. But wait! 1,0 is a giant wall. What to do!? During each step, compare the sprite's blitting coordinate(top left) and the width or height with the wall's location.
ie.
if (sprite.x > mapxlocation*32 && sprite.x+width < (mapxlocation*32)+32 && sprite.y > mapylocation*32 && sprite.y+height > (mapylocation*32)+32) collision == TRUE;
It would be something like this. What this do is creates a "box" around the sprite and checks the box's coordinates (yes, all four!) with the tile's four cordinates.
This is the simplest collision detection there is. If you want greater precision there are spherical and perfect pixel collision detection methods.