There's a lot of methods for doing this, but it really all depends on what your engine needs as well.
The first thing you'll need to do is convert your sprite coordinates to tile coordinates. Let's assume it's an 8x8 pixel sprite:
sprx = (spriteposx(MySprite) - 128) / 8
spry = (spriteposy(MySprite) - 128) / 8
(you can substitute >> 3 in place of /8)
Then, what you can do is reload your tile map and use the coordinates as your offset
MapOffset = ((spry + y_move) * MapX) + sprx + x_move
Reload MyMap, MapOffset
ReadInt z
The y_move would be -1 if you're going up, +1 if you're going down, and 0 if you're not moving in the Y direction
The x_move would be -1 if going left, +1 if going right, and 0 if not moving on the X axis
Now, why the ReadInt z?
What I do is assign a number range for my tiles (to keep it simple) to note which ones are walkable/passable and which ones aren't passable. For example, tiles 1 to 50 are walkable tiles (grass, regular ground, etc), and everything else is impassable.
Next, I do something along the lines of:
If z > 0 And z < 51 Then
' move my sprite routine
End If