You can replace this pin with a new one, if you have one on hand.

To get the holes to line up, put the inner plates in the outer plates of the chain.

Try to keep your chain straight between the front and back gears. Don’t let it stretch diagonally across the gears by being all the way to the right on the front gears and all the way to the left on the back gears at the same time. This chain fix is generally temporary, and you should add a new link or get a new chain shortly afterward. [2] X Research source

It’s not ideal to use a chain that has links with different levels of wear. The best thing to do is to replace the entire chain instead of adding a new link. Master links are made to fit easily onto a bike. They are easy to install quickly, too, making them handy to keep in your saddle bag on long trips. They are, by far, the most common links used by home mechanics. Consult a local bike shop to find one that works for your bike.

Some master links come as 2 asymmetrical halves: a C-shaped piece with both pins and an outside plate. To fix these chains, simply thread the C-shaped pin into the both open holes of the broken chain, then fit the plate on top.

Some mechanics use a tensioner, a simple C-shaped wire that hooks into the grooves of the chain, to hold it taut while linking. While not necessary, a set of hands or a similar tool to keep the chain close together makes life much easier.