Repairing an inner tube on your dirt bike is quite easy.
Throw it out. Use it is an exercise band. See if you can pump it faster than the air leaks for kicks. Attach an air compressor to it and see how large it gets before exploding. Just don't re-use it. It's easier and faster to replace the tube with a new one sans a hole or holes. However, sometimes circumstances dictate the need to know how to patch an inner tube, so that's covered later. For now, we have several suggestions that far outweigh a patch job and get you back on two wheels quicker.
Types of Inner Tubes
Inner tubes come in three styles based on tube thickness. Generally it's Heavy Duty, Ultra Heavy Duty and Extreme Duty or some type of verbiage combination of the three. The difference, of course, is the thickness of the tube with a thicker lining offering more puncture resistance. Depending on brand, heavy duty tubes like Artrax offer around 2 mm if thickness while the IRC Heavy Duty Tube comes in at 3 mm. STI and Michelin offer 2 mm, 3 mm and 4 mm tubes. Thicker tubes also cost more and add weight.
The Artrax Heavy Duty Tube, for example, retails between $10 and $18 while the Ultra Heavy Duty version lists between $17 and $20. Michelin tubes range between $10 and $32. The difference is in the size of tire as well as whether it's front or rear.
Racers don't often run a thicker tube for Motocross since it's rare to get a flat on a well-groomed track, though it happens. Thicker tubes work best for off-road applications and some might argue it's a necessity rather than a nice to have. Clearly, a 4 mm inner tube stands up far better to rocks, logs and barbs than a 2 mm tube.
At any rate, ride long enough expect a flat. It happens. Sometimes it's a slow leak other times it's a total blowout. A blowout typically occurs when the tire hits a sharp segment of rock or other jagged edge or you just landed wrong. This often leaves the rubber tube in tatters or significantly wounded. No chance of repair. However, a slow pinhole leak (dastardly thorns!) fixes well in the short term but not meant for long term riding.
Repairing an Inner Tube
Repairing the inner tube on your dirt bike is no different than repairing the tube on a bicycle. Remove the tire, find the leak and use a puncture repair kit consisting of the patch or plugs, glue, and scuff tool. A patched inner tube keeps you riding, at the very least gets you home and works best for off-road use. You can race with a repaired inner tube but it's not recommended. (If you race regularly then you should have multiple new inner tubes at the ready.) A patched inner tube poses a greater chance of a blow-out or leaking and the peace of mind that comes with a fresh inner tube goes a long way towards reaching the finish line.
Nonetheless, most riders regardless of off-road or racing simply replace the damaged inner tube with a new one. A new inner tube costs less than a patch kit, doesn't take much more room in your trail bag and installation is often quicker than a patch job, depending on how long it takes to find the hole.
Alternatives to Inner Tubes
Have you ever met that one rider that seemingly always encounters a flat? Perhaps it's you. Some riders simply attract flats with little explanation and every ride ends with the repair kit out or the installation of a new inner tube. Alternatives to the inner tube have gained traction in recent years as the Bib Mousse and Nuetech TUbliss System thoroughly eliminate the chance of a flat tire. You won't spend an hour on a side trail repairing a tire or limp back to the pits. Read Pros and Cons: Heavy Duty Tubes vs. TUbliss vs. Mousse" to see which one is right for you.
Even now, most riders use inner tubes (though the tubeless system is growing) and most of them simply replace rather than patch. However, the patch kits retain their relevancy especially in off-road applications. It's not unheard of to experience multiple flats in one outing plus kits contain Co2 cartridges quickly fill a tire with air and take up less room than a tire pump.