MadExistence saidYour gym probably has some kind of boot camp/group exercise. Or they'll have a trainer hold session which demonstrate how to use the equipment. Download a beginners workout routine from online and learn the exercises.
You'll want to do heavy weight and to see results right away, but give it time. Diet is probably the hardest thing to change and to hold to. Whether you want to lose weight or add muscle, diet is very important. That isn't to say eating less and avoiding fat and carbs but eating enough of the right kinds of food.
Also, use the resources in the lifting section of this site. Or bodybuilding.com. There are a lot of genuinely helpful people out there. Avail yourself to their experiences.
As far as motivation, glue pictures of the ideal body you want on your bathroom mirror or computer monitor. Besides being eye candy, it will reinforce your desire to change eating habits and general attitude.
I'm going to piggy back on what MadExistance said however, I'm going to add some stuff:
Most gym do have trainers, and the will start you off with the basic motions, teach your proper form, and how to breathe this is beneficial to you. Plus using a trainer will help you set realistic goals. However depending on your budget they can get expensive and are most often more expensive than your gym membership.
Using the resources on this site as well as bodybuilding.com is a great way to get some routines if you are going it alone. Both have a great on line community that can be supportive with the right people.
Now as far as motivation, the picture idea is a great idea just don't go over board with it. In other words if you are 120 lbs don't put a picture of some guy that out weights you by 100 lbs. Give yourself realistic, specific, small goals for instance, I want to gain 5 pounds by August 1, this is very possible and most likely you can exceed that but it gives you that positive motivation when you do.
Lastly for motivation you can take pictures of yourself, pictures don't lie. Take a picture of yourself this month or when you start and in 30 days take a new set of pictures and compare them.
Hope this kind of helped.