There are multiple exercises you can do to learn how to do a pull-up and you don't need a machine to do this.
You can start with things like negative pull-ups, in which you jump upto the bar and slowly lower yourself back down, this will also get your body used to the movement of a pull-up.
You can also do inverted rows. This is where you have a bar lower to the ground and basically do a rowing movement with your bodyweight. The easiest way (if you have no equipment) is to setup two chairs next to each other and lay a broomstick on them to use as a bar.
Once you've done these things you should be able to start doing assisted pull-ups, using a resistance band to help you perform your first pull-ups.
I don't know if you have access to any other equipment but if you do you can also do bent over rows with either a barbell of dumbells, hell you can even do it using bags filled with sand or bottles of water.
Training your arms will also help you, especially if you want to do a chin-ups.