The public vote, which is called a referendum, will happen on Thursday 23 June 2016.
Here is Newsround's guide to what has been going on between the UK and the European Union.
Back in 2013, British Prime Minister David Cameron promised that if his political party, the Conservatives, won the next general election, then he would let voters have their say on whether or not the UK should stay in or leave the European Union.
Last year, they won the election so it's all systems go.
A referendum is a vote in which all adults can take part, normally giving a "Yes" or "No" answer to a question.
Whichever side gets more than half of the votes wins.
The European Union, or EU, is a group of 28 countries in Europe whose governments work together.
It began after World War Two with the idea that the best chance of stopping another war was by countries working more closely together.
It's a bit like a club. To join you have to agree to follow the rules and in return you get certain benefits.
Each country has to pay money to be a member, which they mostly do through taxes. The EU uses the money to change the way people live and do business in Europe.
It has its own parliament, which is made up of politicians called Members of the European Parliament. They are elected by people who live in European Union countries.
One of the main jobs of the parliament is to change, approve or reject laws that apply to all EU countries.
1957: Belgium, France, Netherlands, Germany, Italy and Luxembourg
1973: Denmark, Ireland and the UK
1981: Greece
1986: Portugal and Spain
1995: Austria, Finland and Sweden
2004: Hungary, Poland, Czech Republic, Slovak Republic, Slovenia, Estonia, Latvia, Lithuania, Malta and Cyprus
2007: Bulgaria and Romania
2013: Croatia
One major reason the European Union was set up is trade: to make it easier for countries to buy and sell things to each other.
Certain rules to do with immigration have been relaxed too - so people from EU countries can move around more freely inside the Union.
EU laws affect many areas of our lives - like how many hours we're allowed to work in a week, health and safety rules, and even how many fish we're allowed to catch.
For the 40 years that the UK's been a member of the EU, there's been a debate about our role within it.
Some feel being part of this bigger club makes the UK richer and more important.
Others argue that the EU takes power away from Britain. They feel that people who aren't British shouldn't be making laws for this country. They also feel it costs Britain too much money.
The question is always important in any referendum.
The question for voters will be "Should the United Kingdom remain a member of the European Union or leave the European Union?"
There are many reasons, but a big one is that some people believe Britain is being held back by the EU, which they say forces too many rules on the UK.
They also want Britain to limit the number of people coming here to work from other European countries.
They believe Britain gets a big boost from being a member of European Union - it makes buying and selling things to other EU countries easier.
They also believe Britain is stronger as part of a big club than on its own.
The Prime Minister, David Cameron, has said people should be able to vote on whether the UK should be a member of the European Union (EU).