Dirt bikes are not hard to ride but they do require some practice to get to where you can safely ride the dirt bike.
It took me around 2 weeks to learn to ride a dirt bike where it took me around 2 months to learn to ride a motorcycle.
A motorcycle weighs more and is much harder to balance until you get the hang up it while a dirt bike is less in weight and is easier to balance and learn to ride.
If you can ride a motorcycle though you can easily ride a dirt bike.
My 8 year old son rides his dirt bike that is built for his size and he learned to ride that dirt bike in just 1 week of practice.
Now he rides that dirt bike all over the place in dirt bike friendly locations.
His Grandpa which is my dad has a farm with lots of land where he can ride his dirt bike on.
I go out there and ride my dirt bike along with him.