this'll give you the info you need. The BEST way to do it is with a bottle of pure ammonia. It can take 6-8 weeks to be ready. Make sure you have a good amount of substrate and run the filter so that the bacteria has lots of place to live in.
Don't do it with a fish in, it's cruel.
There are products, that's what I use, but some people don't like it.
The most important thing about cycling, get a water test kit first, and test the water EVERY DAY, log the results EVERY TIME. Once everything stays at zero and is stable, then add the fish.