A chain is made when a player wants to respond to a card effect with another card effect. The player who activated the first card effect pays the cost of the effect. This is the first chain link. Then if the condition is right, the opponent can respond by activating a card or effect of their own. If the opponent chooses to respond with a card or effect, they pay the cost of that card/effect. This is the second chain link. Then the turn player can respond with another effect, etc., then the chain resolves. The last effect to have activated in that chain resolves first, then the effect that was activated before that effect resolves, and so on. If a spell card/trap card is activated during the chain, it is not sent to the graveyard until the entire chain resolves.
Ex.
Chain Link 1: Player A summons “Dark Magician”.
Chain Link 2: Player B activates “Solemn Warning”, and pays 2000 life point for the cost of “Solemn Warning”.
Chain Link 3: Player A activates “Wiretap”. “Wiretap” does not have a cost.
Now the effects resolve.
Chain Link 3 Resolution: “Wiretap” resolves, negating “Solemn Warning”, and shuffling it into the deck.
Chain Link 2 Resolution: “Solemn Warning” resolves, negated.
Chain Link 1 Resolution: “Dark Magician is successfully summoned.