A stroke occurs when blood flow to the brain is interrupted, either by a blockage or bleeding. This deprives brain cells of oxygen and nutrients, leading to cell damage or death.