Mountain biking can be dangerous depending on what difficulty level trail you decide to take on. Obviously, a beginner will want to start with the lowest trail with only experts attempting black diamond trails or double black diamond hills.
With this said, however, while there is minimal risk when only embarking of a trail of your skill level. Like most sports there is always a risk involved with deciding to partake in physical exercise. Bikers always run the risk of losing their balance and falling or hitting an object such as a tree or rock, which can cause severe damage to the body at high speeds and from heights.
There are also different obstacles that are a part of each level of trail that can determine the amount of danger that is present on each area. For instance, natural obstacles such as cliffs, ridges, bumps, and elevated jumps all increase the danger of a trail. Also a part of any trail that is above the easiest, white circle trails can have bridges that vary in width, and can pass over large drops or dangerous rivers and crossings.
Other dangers that may be present on a trail are loose rocks, animal life, and different tread surfaces which can be harder to travel on while biking. In some areas a trail may be eroded and there are some areas where the trail may disappear and the biker is forced to travel across areas that are very uneven.
All of these concerns aside, so long as you take the proper precautions such as wearing safety equipment like a helmet and knee pads, mountain biking does not have to be a dangerous sport. The most important safety component is knowing your own physical limitations and sticking to them, which like any other sport should keep you safe.