Danger (also risk or peril) is the possibility of something bad happening. A situation in which there is a risk of something bad happening, is called dangerous, risky or perilous.
People often take risks, or do things that might hurt them. An example of this is crossing the road without looking carefully. There is a risk that you might get hit by a car.