Forget what you see in the movies. You can't use your awesome, mean dirt bike on the road to make others green with envy. Not legally anyway.
For one, most races don't even require a racer that is registered as a vehicle – simply a build that can go fast, go dirty and meets race requirements is all an entrant needs. It can be a tedious process to legalise your dirt bike so you can cruise on normal roads, but here are four main parts on a dirt bike that need to be modified for this purpose.
Chances are, your dirt bike didn’t come with a headlight and probably isn't powerful enough to manage one anyway. Depending on the year, make, and model of your bike you may need to upgrade your stator to help power a headlight and other essential lighting components. Outfitted with more copper wire wound around its poles to help produce a stronger electrical current, a new stator can produce enough juice to power your headlight, turn signals, brake lights, and tail lights.
Same power problem as above but your upgraded stator should also be enough for a horn. Alternatively, install a small motorcycle battery but remember this needs regular charging. If you're worried about space, try the compact PIAA Slim Line Sports Horn, which, at 112DB/500Hz, is plenty loud. Most sound requirements say your horn must be audible from at least 200ft away.
Your tyres need to be approved for use by your local Transportation Department or Authority. The good news is that in most places, there are approved tyres that are also suitable for use off road, so you don't have to change tyres all the time. Dunlop 606 and Pirelli MT21 are two common tyres that are approved for use. Check the sidewall to confirm. Many dirt bike tire manufacturers offer tires that are specifically meant for double duty between off road and street use and the tires are typically broken down by percentage of use such as 70/30, 90/10, or 50/50 (off road/on road and vice-a-versa).
Yeah, that lovely sound from your dirt bike is not legal for street use so you'll need mufflers.