The elevator experiment is a mental experiment presented by A. Einstein in 1908 to justify the "equivalence principle".
According to this principle, the effects of a gravitational field are identical to the effects of an acceleration of the observer's reference frame. In other words, if an observer is locked in an opaque elevator (without windows), he will not be able to distinguish whether he is immobile in a gravitational field (for example on Earth), or in the astral vacuum but uniformly accelerated upwards by an engine placed under the elevator.
This equivalence principle has many consequences. It is one of the foundations of general relativity. One of the simplest consequences to understand is the equivalence between the inertial mass (the "m" of F = ma) and the gravitational mass (the "m" of P = mg). Indeed, we use the same quantity "m" in our physics problem solving but there is no evidence that these two quantities are exactly the same for the same object. Another consequence of this equality between the inertial mass and the gravitational mass is the fact that two objects fall with the same acceleration regardless of their mass (and neglecting the friction). This is what Astronaut Dave Scott demonstrated during an experiment filmed on the Moon in 1971.