X-Men chronology can be tricky to follow, the goal of this list is to make it the most straight forward possible.
CAUTION, THE FOLLOWING DESCRIPTION CONTAIN MASSIVE SPOILERS !
• X-Men: First Class (2011): Is about the origins of X-Men, when Professor Xavier is young and meet up with Erik (to become Magneto). It all happens before the fundation of the school (1962). At the end of the movie, Professor Xavier gets shot in the spine due to a bullet dodged by Erik, after what they both go appart. Raven, to become Mystic goes with Erik.
Side note (As seen in Days of Future Past): One year later Magneto will be sent to jail for the murder of president Kenedy (he actually tried to save him) and gets sent to a prison without metal in the pentagon. Raven then vanishes and starts to get justice by herself, in 1973, she is going to do her first murder killing Bollivar Trask, who's working on the Sentinel project.
• Legion (TV Show, 2017): While it doesn't officially sits within the X-Men Cinematic Universe, David Haller is the son of Charles Xavier. The character evolving in a late 60's/70's world where Mutants are not public knowledge, it seems legetimate to slot the show right here, at least for the first season so far. It's not possible to slot it in the new timeline set by Days of Future Past as mutants are publicly discovered in it (after 1973), and including the show after X-Men Origin: Wolverine may make it too confusing (the show is already confusing enough by itself!). THIS SHOW IS NOT MANDATORY, it could very well also happen in a parallel universe.
• X-Men Origins: Wolverine (2009): While the first events in the movie happens way before Professor Xavier's time, the main events are all set around 1975, after the school was founded. In this movie, Logan receive his adamantium squeleton after an experiment launched by William Stryker (before he just had bones) and fight with Deadpool (Wade WIlson) at the end of the movie before losing his memory due to an headshot with an adamantium bullet.
• X-Men (2000), X2 (2003), X-Men: The Last Stand (2006): The story is straight forward. We see Wolverine lost due to his loss of memory (he has some flashbacks about Stryker experiments), meet Jean and Scott who... will die in The Last Stand. Professor Xavier and Magneto are absolute enemies until the end. Magneto gets then full of regrets about what he has done after the loss of his powers, which he starts to get back at the very last scene.
• The Wolverine (2013): Wolverine became somewhat hermit after the loss of Jean in The Last Stand. He ends up in Japan to meet someone from his past and his mind is tortured by the memory of Jean. At the very end of the movie (two years later), Wolverine meets Magneto in the airport, who teamed up with Professor Xavier against a new threat, Trask industries.
• X-Men: Days of Future Past (2014): The future (2023), mutants are tracked down and killed on sight by Sentinels made by Trask industries, this happening because Raven killed Bollivar Trask in 1973... They are about to be wiped out of the planet. Their only solution, send Wolverine back in time to stop Raven to kill Trask and make Professor Xavier & Magneto join forces. Back then, Wolverine hasn't yet passed along William Stryker experiments (in 1975), which mean he doesn't have the adamantium skeleton, making Magneto powerless against him (sort of). While it doesn't go as planned at all, they manage to save Bollivar Trask and shut down the Sentinel project for good, thus reseting the timeline completely. At the end of the movie, Wolverine loses his future consciousness while drowning (being then habited by the former, 1973 consciousness) until one day he wake up in Xavier's school in 2014, seing Jean & Scott alive (meaning the events of The Last Stand never happened). Wolverine has then missed about 41 years of past that Professor Xavier will help to catch up on. It appears that Raven, in the appearence of William Stryker picks Wolverine up from the bottom of the river in 1973 (many events of 1975 from X-Men Origins: Wolverine have not happened, or happened differently...).
• X-Men: Apocalypse (2016): The events in this movie occurs between 1973 and 2014 (actually, in the 70's/80's), period of time that future Wolverine (from Days of Future Past) lost his consciousness. It fills up some gaps here and there, correct some mistakes and confirm the new timeline set by Days of Future Past. We met then Wolvernie in the Alkali Lake base of William Stryker, from where he got his adamantium skeletton in this timeline (it was the same in the old timeline, but it happened differently). The scene from Days of Future Past where Wolverine wakes up in 2014 occurs obviously after the whole X-Men: Apocalypse movie.
• Deadpool (2016): A new attempt to make a weapon to kill mutants (ie: The former Deadpool from 1975 which then never happened). It's a bit timey-wobbly, knowing that there was a Wade Wilson in 1975 (which also became Deadpool of course) and the very same guy (and same actor) is living at about the same age in 2016... But let's forget about that, Deadpool had to "fondle Wolverine balls" to get his very own movie, so be it! He is now Wolverine's best pal (of course) and part of the new X-Men Timeline! Some X-Men (secondary ones) are in the movie and we can see Xavier's School.
Side note: I've put Deadpool after X-Men Apocalypse for more simplicity about chronological events. Days of Future Past being 1973 (2023 from the old timeline, and 2014 for about a minute), Apocalypse being late 70's, Deadpool being 2016.
• Logan (2017): I haven't seen it yet, but it appears to be (for once) straight forward in the chronology, so it will stands as the last X-Men movie to watch so far.