In this recipe, you created Triangle and Square Sprite Placeholder asset files in the Project window. Then, you dragged them into the scene to create GameObjects. For each GameObject, you added 2D Polygon Collider components (following the shape of the Triangle and Square sprites), as well as Rigidbody 2D components, which make these GameObjects behave as if they have mass, gravity, and so on. The Colliders indicate that the objects will hit each other with force and behave accordingly.
Then, you froze the position and rotation of the Triangle GameObjects so that they will be solid and immobile, as if they were made from solid rock mountains. The Square GameObjects were positioned in the middle of the Scene window – as if they were starting in the air, above the ground of Triangle. So. when the scene is played, gravity is applied by the Unity 2D physics system, making the Square GameObjects fall downward until they hit each of the immobile ...