For modern armies, the basic ranks, understood by everybody, are as follows (shamelessly copied from Wikipedia):
Typical units Typical numbers Typical commander
---------------- --------------- -------------------------------
fireteam 3–4 corporal
squad or section 8–12 sergeant
platoon 15–30 lieutenant
company 80–150 captain or major
battalion or cohort 300–800 lieutenant colonel
regiment or brigade 2,000–4,000 colonel or brigadier general
division or legion 10,000–15,000 major general
corps 20,000–40,000 lieutenant general
field army 80,000+ general
army group 2+ field armies field marshal or five-star general
region/theater 4+ army groups six-star rank or head of state
From the level of battalion onwards units tend to have their own specialized administrative and support personnel, composed of enlisted men and non-commissioned officers; from the level of regiment onwards units tend to have a general staff, populated with officers, NCOs and enlisted men. Medics and medical personnel are attached to units from battalion onwards.
As I understand it, in the U.S.A. and many western countries there is a perfectly professional and respectable carreer track for NCOs, distinct from the carreer track of officers; in the former Warsaw Pact, and maybe even today in Russia, I don't know, this was restricted to the higher ranking NCOs, say from the equivalent of a sergeant 1st class (OR-7) onwards; lower ranking NCOs (sergeants and staff sergeants, OR-5 and OR-6) were enlisted men.
There is most usually a third separate carreer track for technical personnel, called warrant officers in the U.S.A.
Wikipedia provides equivalence lists for ranks in NATO countries, where the equivalence is more or less complete for reasons of interoperability:
Nowadays and ever since the middle ages onwards, naval forces have different ranks than land forces; the Romans themselves did not use special words for naval officers.
Air forces sometimes use fancy ranks; drivers of flying vehicles are given exalted officer ranks such as lieutenant or captain, whereas drivers of land vehicles have to make do with enlisted or NCO ranks such as corporal or sergeant. Keep in mind that an army captain commands about 100 men, whereas an Air Force captain commands between zero and about ten men, and a navy captain commands hundreds to thousands of men and is the equivalent of an army colonel.
The number of ranks increases as the military becomes more and more sophisticated. The Romans did not really have any ranks other than private, decanus for infantry or decurion for cavalry (a corporal), centurion (a sergeant), tribune (a lieutenant, captain or major), praetor or later laticlave tribune (a colonel or brigadier) and legate (a major general or lieutenant general); in addition the most senior centurion of a legion was called the primus pilus and functioned as the senior NCO, sort of a sergeant major. During most of the Middle Ages, things were even more simple: there were generals, captains, sergeants and privates. Then war become a complicated profession with an associated formal education and ranks proliferated together with the evolution of military science and technology.
Regarding the specific questions:
Is there a certain rank you have to be to head a fire team? No. It is usual to have a corporal in this role, but a sergeant may be pressed into service if the situation requires it and a private may have to make do if there are no corporals around.
Or fighter squadron? A major or more usually a lieutenant-colonel (called a wing commander in the U.K.).
Do you have to have a minimum rank to be a deck chief? I have no idea what a deck chief is. (Apologies, but English naval and nautical terminology was never a burning interest.) If you mean the chief of the boat, that's simply the man with the most senior enlisted rank in the crew, almost always an NCO -- a petty officer or chief petty officer. If you mean the officer of the deck that an officer, usually a some sort of lieutenant (OF-1 to OF-3) (but see Xachary Thompson's comment, to the effect that in the U.S. navy this is usually a petty officer, OR-6 to OR-8).