A receptacle is merely a means to connect a device to the power source. It can fail for many reasons.
If the hot lead directly touches neutral or ground, a short circuit will occur. If the line is protected by a circuit breaker, it will disconnect the outlet and connecting wires from the power source at the main panel and no current will flow. If you have fuses, the fuse from that circuit will blow, also disconnecting the power. If the fuse or circuit breaker failed to work properly (rare), it could result in a fire caused by overheating of the wires.
This type of problem can occur in the body of the receptacle, in the wires in a box, or somewhere along the wire path.
Break in Continuity
If there is a gap in either the hot wire or the neutral wire or its attachments, no current can flow, and the outlet will not work. However, if the break is in the neutral, even though the circuit does not work, there is power in the hot wire and poses a risk if it is touched.
The gap in connection can occur in the the receptacle itself. It can be a break within the body or a movement of the metal leaf that is supposed to contact an inserted plug, but does not. It also can occur in the attachment of the wire to the receptacle itself, in a connection within the box (loose or disconnected) or somewhere along the length of the wire.
The break can also be caused by a circuit breaker, GFCI or AFCI device or fuse tripping based on a detected fault. This can occur because of a short, a high amperage flow, an arc in the circuit, or a ground fault. Reseting the device may restore power, assuming the fault has been cured, but it is important to determine what caused the fault to ensure safety.
It is important to test to determine whether there is any power at the outlet itself before starting to fix the problem. This requires a tester and a bit of knowledge about circuits. If you are not familiar with these things, it might be better to call in an electrician or someone with some experience to help.
Cures may involve simply fixing a loose connection or replacing the outlet. But it may require tracing a break or short and solving a more complex circuit problem.