Create other sprites that your character cannot move through.
Add an IF block to the game loop that checks if the character is touching another object.
IfÂ touching the object, move the character negative 7 pixels.
If your character is moving forward 10 pixels, when touching the object it should move negative 10 pixels. The two should cancel each other out, that is, they should sum to 0.