Although your oil furnace burns fossil fuel, it still needs electricity to light the flame. The transformer steps up your 120 volt house voltage to several thousand volts to produce a spark across the terminals of an igniter. Heating service technicians use a special high voltage tester to check the transformer. But if you don't want to pay for a service call and you think the only problem is the transformer, you can test it with a screwdriver. You need enough mechanical ability to figure out how to get to the transformer to test it.
Shut off the power to the oil burner. Either turn off the breaker or unplug it.
Open the inspection panels to the burner, find the transformer and loosen it to where you can move it around. Position the transformer so that you can see the high voltage terminals and touch them with the screwdriver. Leave the wiring attached.
Disconnect the power to the motor so no oil will come out while you check the transformer.
Return the power to the oil burner and turn it on.
Place a screwdriver with a well-insulated handle to the output terminals of the transformer so that it is touching one terminal but not the other.
Move the screwdriver so that the gap between it and the terminal it's not touching varies from a half of an inch to an inch and makes an arc. The arc should hold at least three-quarters of an inch with a good transformer. A shorter arc or no arc at all indicates a weak or defective transformer.
While you have the transformer loosened, you can check it for signs of wear. Look for cracking or chipping on the porcelain insulators.
Use a screwdriver with a well-insulated handle and don't touch the blade while you test the transformer. You could get a nasty shock. Make sure the screwdriver is dry. Oil burners need periodic maintenance to make keep them working properly. Just replacing a transformer may not fix all of your problems. To be safe, have a qualified service person check your oil burner after you work on it.