Nitrogen Cycle
This is a lot simpler than it sounds. Aquariums need to be "cycled," which essentially means that bacteria in the tank are able to convert ammonia from fish waste into nitrites and then into nitrates so that the fish don't get sick (or die) from ammonia poisoning. This bacteria, by the way, isn't harmful to humans or fish; it merely feeds off ammonia and converts it into less toxic substances.
If you don't cycle a tank and just dump all the fish in at once, decaying food and fish waste will lead to high ammonia levels in the tank. Ammonia is toxic to fish and will eventually kill even an extremely hardy fish like a danio.
If you do cycle your tank, the ammonia is converted into nitrites, and then into nitrates which are FAR less harmful to fish than ammonia.
Here are some ways to cycle:
Fishless Cycling
This process involves seeding the tank (a few weeks putting the fish in) with something that will create ammonia like fish food, a piece of shrimp, or even household ammonia (as long as it doesn't have any other additives, surfactants, etc). You then use a test kit and evaluate the water until it shows zero ammonia, zero nitrites, and any amount of nitrates. You then do a large water change before adding the fish, which can be added all at once. This process takes a few weeks typically, depending on the size of the tank, but it is considered to be the most humane.
Cycling with Danios
Before fishless cycling became popular, people would use a very hardy fish like danio to create the ammonia (i.e. fish eat food, then what they excrete contains ammonia). This will work and many danios will survive the cycling process, although their lives may very well be shortened. It is a personal decision whether or not you consider this ethical or humane. If you do this, just start with 2-3 danios, and then slowly add more every month. That will give your the bacteria time to catch up.
Bacteria Booster
You can buy bottled nitrospira bacteria that will jumpstart this entire cycling process and let you add fish much, much sooner. The currently popular product is Tetra SafeStart, which is not so easy to find in stores, but local fish stores will sometimes carry it. There used to be a product called Bio-Spira, which did the same thing.
Some people also use Stress Zyme, and this is occasionally bundled with aquarium kits. It's very popular and easy to find, but most would agree that it does not work as well as SafeStart or Bio-Spira.
The internet abounds with inaccurate information on 'bacteria in a bottle' type products. You often see people saying, "well how can the bacteria live in a bottle without oxygen?" The answer is twofold: 1) ammonia can be injected into the bottle before shipping, which is why these products often have expiration dates 2) bacteria are not animals and can exist in an exopolymer state for a long time where they don't need food in the form of ammonia. Ignore anyone who tells you it is impossible for bacteria to live in a bottle; it absolutely is possible. Whether the product you're getting will actually work, of course, is a matter of debate and often dependent on the temperature the bottle was exposed to (these bacteria are sensitive to heat) and how long it was sitting on the shelf.