You work it out via the resolution, here is the basics of the maths involved:
The size of a print depends on the size (pixels) and the resolution (dpi).
For good quality, you should have at least 250 dpi, but 300 would be best.
If a print is made for viewing from a greater distance, e.g. a poster on a wall, you can get away with a lower resolution. The bigger the print and the distance, the lower the resolution needed. For something really big and really far away, 150 dpi would still be VERY good quality.
For example if your resolution was 2100 x 3000 pixels, then at 300 dpi your print size could go up to 7 x 10" at excellent quality.
If you only have a tiny little photo to start off with, i.e. few pixels, there is not much that can be done, you can't invent pixels that weren't there in the first place. Enlarging a tiny photo only makes the quality suffer.
To ensure best possible quality, you need to always leave your camera set to the biggest resolution and highest quality (lowest compression) settings.
Here is a simple but pretty good explanation of it all: http://www.microsoft.com/windowsxp/using/digitalphotography/learnmore/bestquality.mspx
P.S. Apart from size, there are other variables, too, such as quality of the optics, focus, etc.