Babylonia was the state that grew up around the city of Babylon.
The first Babylonian Empire was from c1900 to 1600 B.C. after displacing the Sumerians and before being overrun by the Kassites, who ruled for 450 years. Hammurabi ruled during this period.
The Empire that is usually thought of when Babylon is mentioned is the Neo-Babylonian or Chaldean Empire. A revolt in 625 B.C. against the rule of the Assyrian Empire saw the destruction of the Assyrian capital Nineveh in 612 B.C. Carving up the Assyrian Empire between themselves and the King of Media who had also revolted, a new Babylonian Empire was born which quickly rose to military prominence until its defeat by Persia in 538 B.C.