Before repairs are discussed let us consider preventative measures. Look to see where your sails are in contact with something that will cause wear. You could consider sacrificial patches of sailcloth at the spreaders and pulpits. These reinforced areas will help prevent tears etc. Bear in mind that as you reef the mainsail the area that will come into contact with the spreaders will change, so look for protection there as well. Always ensure your topping lift is sufficiently slackened or it will chafe the length of its contact over several hours and days at sea.
Two of the usual ways of repairing sails are (1) cover the damaged area of sail with new sailcloth on one side of the sail, only. Having sewn this in place you then cut away the old torn sailcloth, leaving only the new sailcloth. (2) A quicker way is to use adhesive backed sailcloth to cover the torn area on both sides of the sail. This means the torn area is not exposed to the weather and wind force, saving further tearing. This is a more temporary repair.
If you decide to use method (1) to repair your sail you need to ensure the following. When sewing in the replacement new sailcloth, make sure new sail thread is parallel to the original threading. If this is not done, the sail will be distorted under pressure from the wind. In addition, make sure you use the same weight of sailcloth to replace this section.
If the tear is near an edge or corner, the repair should be taken into a wider area than just that small patch. This will spread the load and reduce the chance of this happening again.