Well without any information about the fish I can only guess, so here are the most common reason fish die in aquariums (other than obvious things like lack of oxygen, food etc):
Failure to manage the nitrification cycle resulting in ammonia poisoning.
Basically, the nitrogenous fish poop turns into ammonia, and if the ammonia isn't broken down (by bacteria that turns ammonia into nitrite and nitrite into nitrate) it will kill most fish.
In order to determine if this happened, you can buy a kit to test the water for ammonia. In order to prevent this from happening you should do the following:
1) Let an aquarium cycle prior to adding fish. Otherwise your first fish will often die. To let an aquarium cycle means to let it develop the bacterias it needs to break down ammonia. You can do this by buying commercially prepared bacteria for this purpose, or you can do this by using gravel or water from an existing aquarium. Let this water sit for a few weeks before introducing fish slowly.
2) Change 1/3 of the water regularly. This is a manual way to help the process by diluting the ammonia in the water and the basics of this are not to completely change all the water (this will remove the bacteria that breaks down the ammonia), not to add tap water directly (it has chlorine that can kill them, dechlorinate the water first either by using a commercial product or by letting the water sit overnight so it evaporates), and to add the new water slowly (so it doesn't dramatically change the water temperature).
In the wild fish have a lot more water and the ammonia is well diluted, in a small aquarium you may need regular water changing to keep the ammonia levels down. Speaking of water to fish ratios:
3) Don't put too many fish in the aquarium. A very imprecise rule, but that can serve as a general guideline is "one gallon of water per inch of fish". This means that for every inch of fish (how long the fish are) you should have a gallon of water. But in smaller tanks this might not even be enough, and you should avoid the common impulse to add too many fish (hey, anyone who has gotten into aquariums has wanted to add fish).
4) Don't put too much food into the aquarium. If food remains after the fish have eaten for a few minutes it's too much. It will decompose and add to the ammonia problem.
Attacks from other fish
This one's simple. Put the wrong type of fish together and they may kill each other. If you notice fish chasing other fish you should make sure that they aren't being territorial or aggressive. Even if they don't catch the other fish they are submitting it to life-or-death threat all day long and it can die from that.
First of all, the most common way a healthy tank of fish gets sick is through the introduction of sick fish. So when you buy your fish pay attention to the condition of the fish in the tank. Don't buy from places with dead fish, or sick fish in the tanks.
Common diseases are White Spot (Ich), Fin Rot, and other fungus. Research their symptoms and watch for them, and you can get medicine to treat them if they appear.
Different fish need their water at different temperature. You should know the species you have and make sure your water is the right temperature (usual problem is too cold, and you can get heaters).
Also note that sudden changes in temperature can harm some fish.
Incorrect or unstable PH levels
Different fish need different PH levels in the water and you should again know the species you have and make sure you maintain the water at the right PH level range for them. You should also make sure your PH levels are stable. You can buy kits to test this as well. Also make sure not to mix fish that have incompatible PH level needs.
I don't know anything about your fish other than their colors but I bet it was one of those reasons. Welcome to a2k by the way.