Fish are typically divided into three categories: community, semi-aggressive, and aggressive. The first step in stocking your new tank is selecting the type of community you wish to establish. If your tank is less than thirty inches long, I would recommend sticking with community fish. The larger your tank, the more options you have when selecting its inhabitants.
Following is a brief and generalized description of each to help you decide.
1. Community: These are very peaceful fish that are docile and often fairly small. Examples include most tetras (such as neon, glow light, and bloodfin), most live-bearers (like guppies, platys, mollies, and swordtails), danios, some barbs (cherry, gold,and rosy), corydoras catfish, smaller rasboras, and many others. These fish can generally be mixed in any combination, provided that the smallest fish is too big to fit in the largest fishâ€™s mouth.
2. Semi-aggressive: These fish may be territorial, nippy, or simply large enough that they frighten small community fish into hiding. Examples include: angelfish, gouramis, tiger barbs, silver dollars, and rainbow sharks (among many others). Larger, faster community fish (like giant danios and red-eye tetras) may also do well in this type of tank. Mixing semi-aggressive fish is a bit trickier than it is with community fish. For instance, the fast and nippy tiger barbs will probably eat the fins and tail off of slow moving (but territorial) angelfish. Tank size is an important factor as well, since territorial fish need more space to themselves or aggression will become a major issue.
3. Aggressive: This group includes large, predatory, and/or very territorial fish. Many cichlids fall into this group, as do large catfish, gar, arrowanas, piranha, and many other oddball species. Mixing these fish is much more complicated and success depends as much on the size and layout of your tank and the personality of your individual fish as it does on species generalities. Do some research before purchasing one of these fish, as they tend to have more special requirements than fish in the other groups.
Keep in mind that schooling fish (anything with the word tetra, barb, danio, or rasbora in its name, among others) should be kept in groups of at least six per species. Live-bearers will do best in "harems" with one male per three to four females. Other fish, like red-tailed sharks, are aggressive toward fish of the same species and don't need or want any "friends." For the best results, do some reading before buying your fish. I can't stress enough just how important that is... and checking out this article is a great start!