Those take place during Harry's time at Hogwarts, so each book/movie corresponds to a school year. The Fantastic Beasts films are prequels, so they take place decades before the events of the original Harry Potter movies. Now, here's where things get slightly tricky.
(Image credit: EA/Warner Bros.) Harry Potter movies in order of chronological events
Here's the list of films and the year of their theatrical release: