A gaff rig is a way of setting up the sails on a boat. Imagine you have a toy boat with a long stick (mast) and a big piece of fabric (sail) that you want to make it move.
With a gaff rig, you would attach two poles, one big (the gaff) and one small (the boom), to the sail, creating a more triangular or trapezoid shape. Then, you would hoist (lift up) the sail and the poles up the mast using ropes (halyards) and secure them in place.
When the wind blows, it pushes against the sail and makes the boat move forward. By changing the direction of the sail using ropes (sheets), you can steer the boat.
Think of a gaff rig as a technology that makes it easier to use the wind to move your toy boat the way you want it to go!