If I want to pay Bob, and I have opened a channel with Alice, and she has an open channel with Bob, it seems straightforward: I pay to Alice, she pays to Bob.
What if she refuses though after I pay to her? Is there a way to make it atomic and trustless?
It is not like you are sending Alice the payment and hope that she will send it to Bob.
The funds get locked in a multi-sig. If Alice would 'refuse' to pay Bob she wouldn't gain any advantage since she can't get the funds out of the 2-of-2 multisig.
When a channel is open you are basically sending signed transactions back and forth.
If an malicious actor 'breakes the rules', an earlier state is going to be published, which depending on the case, can lead to the attacker losing all of his coins.
This leads to no trust being required into the 'middlemen' to process the payment.
To get a slightly more detailed explanation, visit
https://thecoinoffering.com/learn/what-is-the-lightning-network/ and scroll down to the part with 3 people involved.