Here's a list of the things I did in order to get my first pull up:
Get a source of motivation: I listened to music on my iPod in the gym at first. I find it terribly boring and distracting to go to the gym or exercise in general without some sort of music on.
Train the muscles that are used in the pull up: Pull ups (standard grip, which is a little wide) work the lats, biceps, rhomboids (between shoulder blades), rear deltoids, and trapezius. There's also a bit of chest work in there too. You don't have to separately exercise all of these muscles. The prime movers here are the lats and biceps. Some shoulder and chest work wouldn't hurt. As the grip gets closer together, more stress is placed on the biceps.
Use your time wisely: I had plenty of time whenever I went to the gym on my own, but I had a time constraint in my weight training class. This helped me how to use my time wisely in the gym, so that I could get more done in less time. And when I say "get more done," I don't mean going through the motions of the workout. I worked with intensity so after my workouts, no matter how short, I always felt I got something done.
*Lose body fat: This didn't apply to me so much, but it is necessary to lose fat and build muscle. Why? Excess body fat does nothing for you while muscle works for itself. I noticed that with less body fat, some things were easier because of muscles pulling their own weight. Different types of cardio will work wonders.
Never give up