Most trimmers have two stroke engines which don’t have a sump filled with oil for lubrication (four stroke trimmers however are available). So lubricating oil must be mixed with gas before filling the tank. In general, the oil to gas ratio for a 2-stroke engine should be 1:50. This equates to 20 ml per liter or 2.6 US fluid ounces per US gallon. Some manufacturers recommend a 1:25 ratio for their engines so check your manual. 1:40 is probably a good compromise.
You can buy small bottles of two stroke oil which are sufficient to make up about a gallon or 5 liters (litres) of mix in a gerry can. Alternatively you can buy larger liter or quart bottles of oil. Oil can then be measured out into a graduated measuring cup or any other suitable container which you know the volume of. Add the oil to the gas can and then swirl it around to mix thoroughly. Its probably a good idea to wipe out any remaining oil from the measuring cup with a paper towel, otherwise all sorts of dust and dirt, spiders and insects will have stuck to the oil by the time you use it the next time.