When you receive an email confirming your ticket purchase, it should include your flight confirmation number prominently—often in the subject line as well as near the top of the email itself. Many airlines will also show your confirmation number on the screen just after you’ve booked, even before an email is sent, and the code will also be on your boarding pass once you’ve checked in. If you have any trouble finding it, call the airline.
At any point after booking, you can use your confirmation code to check your reservation on the airline’s website. It’s a good idea to write the number down somewhere, whether that’s an app on your phone or an actual piece of paper in your wallet, so it’s handy until you’re back from the trip.