Bicycle tires sizes are noted in diameter and width. While there's room for variation in widths, a tire's diameter needs to be accurately matched to the wheel size. The easiest way to discover the size needed for a replacement tire is to find it stamped on the old tire.
Bike tires are generally listed in diameter first, then by width.
Common mountain bike tires today are either 26 or 29 inches in diameter with widths ranging from around 1.5 inches to beyond 2 inches. A 26 inch diameter tire of 1.5 inch width, for example, would be noted as 26 x 1.5. For any given rim, there's room to choose a width that works best for your intended use. Basically, the wider a tire, the more stable and/or suitable it might be for off-road situations, but also the slower it might be.
While road bike tires used to be measured in inches (27 inch diameters being common), today they are measured in metric terms and are most often 700 millimeters in diameter, but sometimes 650mm. There widths might range from 21mm to 28 mm, a common width being 23mm. The most common road bike tire size then, would read 700 x 23. Again, wider tires might be more stable and offer more shock compliance, but at the cost of increased rolling resistance and slower speeds.
If the rim size is not known, it can be measured by the noting the distance from rim edge to rim edge, being sure the rims center is transected, or the rim can simply be taken to a bike shop.