you check for the collision and then tell the program what to do if you hit the object, after all you might not want to stop, you might want to ring a bell or add to the score or explode the objects or make it sink into the ground or fly away or open a door elsewhere on the map or whatever you wanted to do in your program, so you have "object hit" and "object collision", these are different ways of testing for collisions, you could use it like this (psuedocode)
do
save old position
get next position from keypresses
if object hit(playernumber,wallnumber)=1 then position=old position
sync
loop
what happens is the object hit function returns 1 when the player hits the wall, so you get put back to where you where before you hit the wall, if you keep trying to go through the wall then you keep getting put back, so you seem to stop, (although the computer is actualy putting you at the wall and then back where came from over and over), if you wanted to test for a pickup, like a health bonus you do..
do
get next position from keypresses
if object hit(playernumber,lifebonusnumber)=1 then life=life+20:delete object lifebonusnumber
sync
loop
in this case you dont stop, you just get 20 added to the variable life and the object is deleted to stop you picking up more life from it, you could use code to test for the player hitting a door, that could make the door open, or it could only open if a variable like redkey=1, so then you could set the redkey to one when they player hits the redkey (wherever you put that on the level) and then open the door when the player hits it IF they had hit the redkey, easy yes?, hope thats some help.
Mentor.