how the lightning is connected to the Bitcoin blockchain?
When a Lightning channel is opened or closed, there is a corresponding transaction on the Bitcoin Blockchain. From what I’ve read, the opening transaction involves a 2 of 2 multisig output. It can’t be distinguished from similar outputs created for reasons other than opening lightning channels.
In between those events there would typically be a large number of lightning transactions, using Lightning channels, that leave no trace in the Bitcoin Blockchain.
Useful References










