The European Union was not created in the form it takes now. It has developed by stages, through a series of treaties agreed unanimously and ratified by its member states.
Institutional developments
Single European Act
Maastricht Treaty
Treaty of Amsterdam
Treaty of Nice
Enlargement
There is a second, parallel development of the European Union which has been underway at the same time, namely the enlargement of the EU to include new member states. Follow the links here to read about the membership debate in different European countries.