Well, you can watch the movies in the following order:
First, X-men First Class, as it depicts how Professor X and Magneto met.
However, in order to watch X-Men Days of Future Past, you have to watch the original trilogy. You should finish X-Men, X2 and X-Men the Last Stand.
You can also watch X-Men Origins Wolverine Before original trilogy, but
there is a cameo appearance of Professor X. However, by watching this movie, you will know how Logan got metal claws and help watching X2.
So X-Men and then X-Men Origins Wolverine.
Once you have completed these movies, see The Wolverine, as
it has a scene that is related to X-Men Days of Future Past.
It also shows events took place in Wolverine's life after what happened in X-Men the Last Stand.
After that, watch the upcoming movie, X-Men Apocalypse.
CONCLUSION
The Order of the movie can be:
- X-Men First Class
- X-Men
- X-Men Origins Wolverine
- X2 X-Men United
- X-Men The Last Stand
- The Wolverine
- X-Men Days of Future Past
- X-Men Apocalypse
Deadpool is also a part of X-Men series, but it is not related to any of these movies. However, one can see it after X-Men, or as per comment by cde, X-Men Apocalypse.
Edit after release of Logan
Logan movie is set in 2029, after X-Men: Days of Future Past. So it can be watched after DoFP without requiring to watch Apocalypse or any other movies if you have character knowledge as mentioned on my other answer.