Hiking isn't typically dangerous. Much more often it's a great pleasure, even an adventure. But you're outside, sometimes far from 'civilization' and you can get injured or worse. It pays to heed some common sense safety tips.
Tip #1 - Do not travel alone
Like any rule, there are exceptions. If you're just going for a stroll in a nearby, well-traveled area you're as safe there as anywhere. But if you travel through heavily forested areas, with steep canyons and winding trails, you can easily get lost. And, of course, there are lots of gradations in between. Use your judgment.