the lightning neywork is based on the concept of payment channels. in bitcoin, a payment channel is a transaction where your funds have been sent back to yourself with a timelock on them and until the timelock expires the transaction can be updated by spending the same coins again, with a shorter timelock.
by repeatadly updating the transaction without sending it to the miners, you and the party you opened a payment channel with can re-negotiate how much of the timelocked funds to give to the other party.
when you are both satisfied you can broadcast the end result to be settled/stored on the blockchain.
if the other party no longer wants to negotiate they can take the last accepted result and broadcast that to the network.
if you no longer want to negotiate you can do the same, or wait for thr initial timelock to expire to get your funds back.
the lightning network uses chains of payment channels to enable transactions between distant parties, and is still in development.
as such details on how it operates may still change.
my explanation above is a simplification to get you started. for a more visual explanation I suggest you use youtube to find a more detailed or up-to-date explanation.