Firstly you need two objects to collide. you must then turn on the collision for each object. Use the code:
set object collision to boxes [objetc number]
In your main loop you need to store the position of the player
before he moves and then check for collisions using this command:
if object collision( [object 1] , [object 2] )=1
You must position the player at his orignial starting position if this statment is true.
If you have multiple objects and want to check easily use this command:
if object collision( [object 1] ,0)>0
This will check if object 1 is colliding with any objects at all. Warning: this can be slow with many objects.
This is the most simplest collisions you can do.