A gym often includes an initiation session when you first join. After this, an example programme can be discussed with a fitness trainer. This is most successful when laid out on a grid so that you can tick each exercise, the time taken and the frequency, each time you visit the gym. This is motivating and provides a record of your progress.
You can use a commercial programme but it won't be geared to your individual body-type, age, fitness level and any other aspects peculiar to you. Even if you only have one session with a qualified fitness instructor, getting such a programme laid out is worth every penny. Then it's up to you to keep to it!