The fly size refers to the size of the hook gap (or gape), which is the distance from the shank to the point. Here’s an illustration from Mustad:
Hooks of a given size will vary also by the thickness of their wire, by the length of their shank, whether the eye is turned up, down or straight, and several other characteristics like whether it is finished to resist corrosion in salt water, the shape of the bend etc. all depending on its intended use.
If you take up tying you'll want to learn more about this, but for now, if you're buying flies from a reputable source, the flies will be tied on the "correct style" of hook, so all you have to worry about is the "size".
But even hook size can be a little confusing.
Hooks sizes designated with a "__/0" get bigger as the number increases.
These would be designated as "ought size" hooks, so "2/0" would be referred to as "2 ought"
Biggest 19/0, etc etc 12/0, 11/0, 10/0, 9/0, 8/0, 7/0, 6/0, 5/0, 4/0, 3/0, 2/0, 1/0
and from here hooks get smaller as the size number increases. Except for size "1", down from here hook sizes usually are even numbered:
bigger < 1, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22 etc. etc, until size 32 (incredibly tiny)
Just to give you a general idea, here are just some rough guidelines (as opposed to hard and fast rules) for fly sizes for different fish:
Size 11/0 and up are generally used with bait for the biggest man eating sharks etc
10/0 generally the upper size limit for flies, used on flies for marlin, biggest tuna etc.
Big tarpon 3/0-1/0
Redfish, 2/0- 4
Snook, specs 2/0-2
Summer flounder 1-2
Florida bonefish 2-6
freshwater bass 1/0-6
panfish (like bluegill etc) 8-12
fresh water trout typically size 6-20, and tiny specialized 22 and smaller
Hope this helps!