I strongly recommend you to get a special tool called a chain breaker. There are improvised methods too, but they're all fiddly and awkward. Unless your nearest bike store is really far away I strongly suggest that you get the proper tool instead. They usually come with instructions anyway, which can be helpful to you.
Chat with our AI personalities
It is possible to use a hammer, a drift punch and a pipe as an anvil. But it is fiddly, difficult to get it right and has a high risk of injuring yourself and messing up the chain and the bike. I do not recommend it.
9 out of 10 people would get done faster (and with a better result) if they went and bought a chain breaker tool instead of mucking about with improvised methods.