Box shadows are created when two or more objects are placed in front of each other so that the light from one object falls on the other object, creating a shadow.