Cocoon is what a powerful self-aware Crystal in Pulse believed to be the best environment for humans, and so it created it, the floating city of Cocoon. The city is highly advanced, and maintained by the Crystal that created it. At some point in Final Fantasy XIII, the government becomes paranoid of any influence from Pulse and forces out anyone suspected of harboring any.
What is believed to be the world in which Final Fantasy XIII takes place is known as Pulse. At the time no other planets are none of, but FFXIII may very well have more than one, it is unknown right now. Nonetheless, the world of Pulse is thought to be mostly a wilderness, with little to no cities, inhabited by beasts and monsters. There are people in Pulse, with the Pigs Tailed Girl known to be one of them.
Square Enix has said that the Final Fantasy XIII starts off with the people of Pulse being fed up with Cocoon; thus, they invade Cocoon, with Lightning leading the charge.