Lightning uses so called hashed time locked contract (HTLC) between nodes backed by bitcoin 2-of-2 wallets, with punishment options baked into the transaction script if people try to unilateraly reallocate funds from the channel. The channels between nodes form a payment network, where each node forwards funds (in return for a small fee).
To use a metaphor: bitcoin is the gold, lightning are green dollar notes with a guarantee to exchange those notes for gold anytime - just as our monetary system was before 1971 when Nixon broke that promise. Lightning is built in a way that it is decentralized and that promise can never be broken. And you can send those notes via the internet in sub-seconds.