You're lifting weights.  The first time feels easy, but each lift takes more and more effort  until you can’t continue.  Inside your arms, the muscles responsible for the lifting have become unable to contract. 
Why do our muscles get fatigued?  We often blame lactic acid  or running out of energy, but these factors alone don’t account  for muscle fatigue.  There’s another major contributor: the muscle’s ability to respond  to signals from the brain. 
To understand the roots of muscle fatigue, it helps to know how a muscle contracts  in response to a signal from a nerve.  These signals travel from the brain to the muscles in a fraction of a second via long, thin cells called motor neurons.  The motor neuron and the muscle cell  are separated by a tiny gap, and the exchange of particles  across this gap enables the contraction. 
On one side of the gap, the motor neuron contains a  neurotransmitter called acetylcholine.  On the other side, charged particles, or ions, line the muscle cell’s membrane: potassium on the inside,  and sodium on the outside.  In response to a signal from the brain, the motor neuron releases acetylcholine, which triggers pores on the muscle  cell membrane to open. 
Sodium flows in, and potassium flows out.  The flux of these charged particles  is a crucial step for muscle contraction: the change in charge creates an electrical signal called an action potential that spreads through the muscle cell, stimulating the release of calcium that’s stored inside it.  This flood of calcium causes  the muscle to contract by enabling proteins buried in the muscle  fibers to lock together and ratchet towards each other, pulling the muscle tight. 
The energy used to power the contraction comes from a molecule called ATP.  ATP also helps pump the ions back  across the membrane afterward, resetting the balance of sodium  and potassium on either side.  This whole process repeats  every time a muscle contracts. 
With each contraction, energy in the form of ATP gets used up, waste products like lactic  acid are generated, and some ions drift away from the muscle’s cell membrane, leaving a smaller and  smaller group behind.  Though muscle cells use up ATP as they  contract repeatedly, they are always making more, so most of the time even heavily fatigued muscles still  have not depleted this energy source.  And though many waste products are acidic, fatigued muscles still maintain pH  within normal limits, indicating that the tissue is effectively clearing these wastes. 
But eventually, over the course of  repeated contractions there may not be sufficient concentrations of potassium, sodium or calcium ions immediately available near  the muscle cell membrane to reset the system properly.  So even if the brain sends a signal, the muscle cell can’t generate the action potential necessary to contract.  Even when ions like sodium,  potassium or calcium are depleted in or around the muscle cell, these ions are plentiful  elsewhere in the body. 
With a little time, they will flow back to the areas  where they’re needed, sometimes with the help of active sodium and potassium pumps.  So if you pause and rest, muscle fatigue will subside as these ions replenish throughout the muscle.  The more regularly you exercise, the longer it takes for muscle fatigue  to set in each time. 
That’s because the stronger you are, the fewer times this cycle of nerve signal from the brain to contraction in the muscle has to be repeated to lift a certain amount of weight.  Fewer cycles means slower ion depletion, so as your physical fitness improves, you can exercise for longer  at the same intensity.  Many muscles grow with exercise, and larger muscles also  have bigger stores of ATP and a higher capacity to clear waste, pushing fatigue even  farther into the future.