Iraq, as run by Saddam, was generally accepted as a country with a legtimate & acknowledged government. They had a place at the UN (dictator protection league - go figure) and had embassies pretty much worldwide.
Knocking over the acknowledged government of a country is usually considered an act of war.
Iraq invaded Kuwait in 1990. An international coalition, led by the US, came to Kuwait's aid. None of those countries was in a formal state of war with Iraq -- Kuwait was, and the international troops were just there to help free Kuwait and defend Saudi Arabia.
The shooting stopped due to a cease-fire. There was never a formal peace treaty. If Saddam failed to abide by the terms of the cease-fire, then hostilities would resume. It's a fine distinction, but an important one in the world of international law.