a ferromagnets strenght is determined by the material. Simplified, the more unpaired electrons in the material the stronger magnetic field it has. The atoms has to be fairly alinged as well so the magnetic dipol moments add up instead of cancel each other.
Offcourse if you have 2 magnets of the same material the bigger magnet will be the stronger.
Here is a link I think you will find interesting http://en.wikipedia.org/wiki/Ferromagnetism