Cycling is a simple name, for a not so simple process. When your tank is cycling, what it is really doing is growing bacteria. These bacteria turn ammonia and nitrite, which are very dangerous to fish, to nitrate, which is only dangerous in very high levels. That is why if you add to many fish before you tank has cycled, or built up enough bacteria, you can end up with very high levels of ammonia or nitrite, which can be deadly for you fish.
To start the cycle, you need a source of ammonia. Most people just add a few fish to the tank, and the fish will naturally add ammonia to the tank. The problem with that approach is that these first few fish have to live in water with elevated levels of ammonia or nitrite for a few weeks or more. Even if they don't die from it, it is very hard on them. The other option is to artificially add ammonia, aka fishless cycle. The tank will still go through the same cycle, but no fish will have to live in it until it is completely cycled.
There are many things to add to your tank to get your ammonia to spike to start a fishless cycle. Some people like to use pure ammonia, which can be purchased in the cleaning section of many stores. I prefer to add frozen shrimp (meant for human consumption). As the shrimp decompose, ammonia will rise. You need about one large shrimp per 10-15 gallons.
After you add the shrimp you should test the tank every day or two for ammonia and nitrites. You should first see your ammonia rise. Then the ammonia will drop and nitrites will start going up. Then the nitrites will drop. The nitrites are turning into nitrates. Once you get a zero reading for both ammonia and nitrite your tank has cycled. If you never get a substantial reading (above 2ppm) for ammonia, then you didn't add enough shrimp.
Now your tank is free of ammonia and nitrites, but has a lot of nitrates. You should do a 50-75 percent water change to get the nitrate levels down before you add fish.
The bacteria that turn the ammonia into nitrite, and nitrite into nitrate will die without an ammonia source. This means once you see your nitrites go down, you need to add fish within a few days.