You can see a personal trainer regularly for years, or you can take a few sessions and then work out on your own, perhaps seeing the trainer for a checkup every few weeks.
It is often worthwhile to book just a couple of sessions to make sure you're using the equipment correctly. It's customary for personal trainers to sell packages, often 10-12 sessions, at a reduced rate. These usually have to be taken in a certain time period and are paid for up front. Trainers who are club employees are bound by club rules, but those who are independent are more flexible. You may have to shop for a trainer you like who offers a deal you like. Don't be pushed into something that's too long or too expensive for comfort. You may not be able to get your money back.