Depth in GameMaker is used to order objects from lowest to highest in a room. It can be seen much the same as a layer in an image editor such as Photoshop. By default, an object's depth is set to
0. If more than one object has the same depth value, then they will be ordered first to last, based on the order you create them in the room.
The higher an object's depth is, the lower it is drawn in a game room. So if an object with a depth value of one overlaps an object with a depth value of zero, then the object with the depth value of zero will appear on top of the object with a depth value of one.