The model you are referring to is called a pendulum. In this setup, a weight is hung from a wire or string, and when the weight is displaced horizontally, it oscillates back and forth due to gravity. The motion of the pendulum can be used to detect and measure horizontal movement or acceleration.