Learn how sidechains connect to the main blockchain using two-way pegs and bridges. We explain the mechanics, security risks, and real-world examples.