The perception of an object as distinct from its surroundings is called figure-ground perception.
This is a fundamental principle in visual perception that allows us to distinguish objects from their background. Our brain uses various cues like color, shape, and depth to separate the figure (the object) from the ground (the background).