Peril is the thing that causes loss. So peril is the cause of a loss. For example, if your book is stolen, then we say that the peril or cause of the loss of the book is theft. The peril here is the theft. If a severe draught brings about agricultural failure, then we can say that the peril or cause of scarcity of food is the draught. The peril here is the draught. If your house is destroyed by fire, then we say that the cause of the loss of the house is fire. If you car is destroyed in an accident, then we say that the cause of the loss of the car is accident.
Hazard is the condition that created or increases the chance of loss arising from a given peril. For example, storing petroleum in the kitchen is a hazard, which increases the chance of loss from the peril of premature death.