Allow plenty of time at the airport, so that you can watch the planes landing and departing, ride up and down and up and down and up and down on the escalators, run around the big spaces, ride on a luggage trolley.... airports are like very very exciting playgrounds for a small child! this will also help use up some energy before the flight.
Best inflight entertainment we have found is an iPad. No question. Other than that, colouring books that come with stickers are great as are children's magazines, as they usually have stories, activities, stickers and a free toy.
Also talking about the flight in advance and preparing the child for it is key - so talking about using a small voice because it's a small space, being considerate to the person in front of them by leaving the table alone or not kicking the back of the seat, generally encouraging the behaviours you want so that they know what your expectations are.
Make sure you have plenty of snacks too. In flight meals don't tend to be child-friendly....
I'm doing a journey with my two kids shortly and similar to the last time I flew with them, I'm packing lots of little toys and games to distract them and some healthy snacks for the journey too. Playdoh is a great one for little ones as it keeps them very entertained, and little cars and small picture books are good too. Lots of the $1/$2 toys from Big W can make great distractions as well. If it's a day time flight, take regular walks around the airplane as this kills time and helps expend energy too.
Another tip is to let them use up all their energy at the airport before you fly....so let them walk round, run round and get their spent up energy zapped before you hit the flight.
Talking to your child about the flying experience and what to expect is also a good tip if they are first time flyers.