Hotdogs are fully cooked and do not require cooking them before eating them.
But heating the hotdogs up before eating them will make them taste better and can kill off any bacteria that might be on the hotdogs.
I used to eat hotdogs out of the package as a kid though and never got sick from it so it's safe as they're already cooked but just requires heating them up if you want too.
It's best to cook or heat the hotdogs first though because they will taste better but it's not required.