I think everyone who has gone to the gym understands your situation, since we were all beginners at one time. Trying to figure out what a machine does can be kind of humiliating; what if you're using it wrong? For that reason I recommend talking to a personal trainer just to get a primer on the equipment. I have no conflicts of interest here -- a trainer can really help break the ice in the gym. If this isn't an option, it is easy to self-educate with videos these days.
In any case, here are some basic things I think everyone should know about using the gym, and how to act respectfully towards the establishment and other patrons:
- Read the gym rules
This is really important. If you don't read the gym rules, know that those around you probably have and aren't happy with you if you don't follow them. The rules will be posted conspicuously somewhere in the gym. Read them and follow them. Try to encourage others to do the same if you can.
- Rack your weights
This is a pet peeve of every experienced gym patron. Put the weight back where you found it. Also, nobody likes hunting down weights, or having to dig through plates when the 5lb plate is buried behind four 35lb plates. Keep it neat. Put your weight back where it belongs when you're done. Leave things more organized than the way you found them.
- Use the equipment properly
If there's a squat rack and you're doing curls in it, you're preventing someone from using the equipment as it was designed. For example, you don't need a power rack to do curls unless you're curling so much you physically can't pick the weight up off the ground.
- Be respectful towards beginners
You were a beginner once too. Help them if you can do it in a friendly and non-intimidating way. Be a friend to a beginner. Then spot them, teach them, help them, be their workout buddy. Let's all be friends here, right?
- Share
Don't hog the equipment. Let people work in if you're going to take a while. If you see someone who looks like they're waiting, ask them if they'd like to work in. If the gym is busy, be especially vigilant and try to be aware.
- Communicate
If a piece of equipment you'd like to use is not in use, but out of place, ask others if they are using it, or have seen anyone using it recently. Also, in general, ask if a piece of equipment is in use in a busy gym if you have the opportunity.
- Clean up after yourself
If you're sweaty, wipe it down with sanitizer! Even if you aren't, some gyms cultivate a very clean atmosphere. When in doubt, wipe it down.
A couple of minor points:
- Yield to people carrying weights
Encumbered people have the right of way. Give them space.
- Don't hog the water fountain
It's impolite to fill your water bottle in the water fountain when people are standing in line and just want a sip.
Basically it all comes down to respect. Respect the space in the way you'd like your own space to be respected by others, and everything will be fine!