All I can see here are two transactions of equal market value at the time of transaction on two different chain. How do we know that they are connected? Is this what meant by atomic swap?
that is exactly what atomic swaps are. you "swap" one currency for another. you give 10 Dollars and receive 8.42 Euros. you give 10 LTC and receive 0.1337 BTC (in this particular swap).
they are done through smart contracts in a safe and automatic way utilizing the powerful bitcoin script language.
here is the details of the transactions involved in the swap between LTC and BTC posted in OP:
the person with LTC locks 10 LTC into a P2SH output (OP_HASH160 86491d98a99146ab22a066e0d8e6f3a403071af8 OP_EQUAL) created using the following redeem script. in other words makes a deposit into this Litecoin address: ML9CNJBtSPMABYcCQV58P2t4M7MpPRJK95
the redeem script:
hex = 63a6142c5b442dcfd70ed65b9c90956844525527d9ab3c8876a91497cf2d5d3d30dc84b3aa09d68372d2533753b538670467d9c659b17576a91493cc61870ae8c76ccc7926f5c70dec4f5761a58b6888ac
human readable:
OP_IF
OP_RIPEMD160 <2c5b442dcfd70ed65b9c90956844525527d9ab3c> OP_EqualVerify OP_DUP OP_HASH160 <97cf2d5d3d30dc84b3aa09d68372d2533753b538>
OP_ELSE
<67d9c659> OP_CheckLocktimeVerify OP_DROP OP_DUP OP_HASH160 <93cc61870ae3bc3291e0bad4c08d88e41d9ef536>
OP_EndIf
OP_EqualVerify OP_CheckSig
the person with BTC locks 0.1337 BTC in a P2SH output (OP_HASH160 ac938614bf4288b3e41385d49fc0531d847551ff OP_EQUAL) created using the following redeem script. ie. deposit into 3HRWsfjpBHiJ7hC3jKJV5nbHMeBgoCPHDq
hex= 63a6142c5b442dcfd70ed65b9c90956844525527d9ab3c8876a91497cf2d5d3d30dc84b3aa09d68372d2533753b538670467d9c659b17576a91493cc61870ae8c76ccc7926f5c70dec4f5761a58b6888ac
human readable:
OP_IF
OP_RIPEMD160 <2c5b442dcfd70ed65b9c90956844525527d9ab3c> OP_EqualVerify OP_DUP OP_HASH160 <3aa29799bae62940f3235cc58e0420359aa0fdf8>
OP_ELSE
<1b87c659> OP_CheckLocktimeVerify OP_DROP OP_DUP OP_HASH160 <70d0975d5053bc3291e0bad4c08d88e41d9ef536>
OP_EndIf
OP_EqualVerify OP_CheckSig
what this does is that it creates a "condition" to spend this output using if/else. the user either provides some data that could be hashed to have a result equal to "2c5b442dcfd70ed65b9c90956844525527d9ab3c" and then can provide a signature with his own key that spends the output OR if the specified time in the else part is passed the other key owner can provide their own signature and spend this output.
this means no party can spend the coins without either waiting for the time to pass or to reveal the secret making the other party spend their output.
as you see the first hash after the IF is the same which is the secret, the locktimes in ELSE part are timestamps to prevent fraud. the LTC part is at 0x67d9c659 which is 9/23/2017 10:00:07 PM UTC and BTC part is at 0x1b87c659 or 9/23/2017 4:08:59 PM UTC.
the trade completes by one party providing their own signature+public key with the "secret to be hashed" and spending the coins they received. then the other party copies that "secret to be hashed" and uses it in their own transaction on the other chain to spend the coins they received.