Basically, it's about two things: keeping your fish alive and healthy, and ensuring that they have a good life for their particular kind, getting to do the sort of things they need. This means that a 12 gallon tank is not really suited to any fish that grows larger than a few inches or produces a lot of waste- for health reasons. For good-life-reasons it will also not be suitable for any fish that is a fast swimmer, or (unless kept on its own) is very territorial. Suitable fish for this sort of tank would include: guppies, platys, corydoras, small tetras (like cardinals, neons), a dwarf gourami, honey gouramis.... It is not suitable for angelfish (too big), plecos (too big+too messy), nor really for danios or swordtails (too fast) or for any shark (too big,+ too territorial). But there is still a wide choice. A fish that is in a tank too small for it will become stressed and unhealthy long before it LOOKS cramped, so it's important to plan ahead.