Building muscle isn't tough, but it does require time, commitment, and some intelligence for most of us. Some people are naturally muscular, lean, and strong but that doesn't describe me and it probably doesn't describe you since you are reading this.
Here are the three requirements to build muscle effectively: exercise, rest, and nutrition.
The exercise part is the most obvious to people. Resistance exercise does work best, either free weights, exercise machines, rubber exercise bands, or similar. Now you can potentially build muscle with aerobic exercise, for example build big muscular legs through skiing or biking a lot, but that is a side effect of that type of exercise and to build an evenly muscled body you need some type of resistance exercise program. Now it just might be that you work construction or do other work that involves physical labor and get your exercise that way, but that is not most of us. Most of us have fairly sedentary jobs.
Of the options available to most of us, free weights certainly work best. Although machines etc. have their place and you can even use them exclusively, you will see the most benefits the fastest from free weights. Make sure you have someone show you the ropes: a personal trainer, a gym employee, etc. and be careful to avoid poor form as injuries are more likely then.
Also of course get a medical doctors okay before starting any exercise program! This is critical.
Rest is also important. Did you know that muscles do not grow when you exercise, but when they are recovering during rest periods between workouts? It is common for beginners (and others) to be too "gung ho" and over train. Severe soreness, lethargy, and moodiness can be symptoms of overtraining. Some soreness is certainly OK, and you will learn to tell "good" soreness and "bad" soreness apart quickly.
You need to make sure you do not work each body part too often per week, too hard at each workout, and that you get adequate sleep. I find that I need more sleep when I have extra heavy workouts. Also factor in other exercise you may get, including sports and aerobic exercises.
Nutrition is critical! As the saying goes, you cannot out train a bad diet! Protein requirements are perhaps the most obvious as they go up, but general healthy eating and nutrition is even more important when building muscle.
Learning to cook can help enormously with nutrition. Basic cooking skills are simple, and when you control the ingredients, you know exactly what you are eating. I always suggest people start with a healthy recipe or two they enjoy and then expand their cooking. Basic healthy cooking is very easy, and fun!