Around 2140, miners will stop getting new bitcoin and will be paid only through transaction fees. The network keeps running as usual.
Go deeperBecause of the halvings, the new-coin reward gets small long before 2140. Whether fees alone will pay enough to keep the network secure is an open debate. Supporters expect a bigger, busier network to generate plenty of fees.