Well to be honest a lot of people go too much on protein because they read some lies by supplement factories to get money.
Every macro nutrient is important. It's not like fat is less important than carbs is less important than protein. You need all 3.
To gain weight you simply have to eat more food, or in other words calorie surplus, which makes intake of protein sources, carb sources, fat sources a lot easier than in the calorie deficit (eat less food for fat loss).
Carbs is your energy/fuel source, if you don't get enough carbs, your body will use protein as an alternate fuel source, and your muscles won't grow as much as they would if you were feeding them both protein and carbs. Fat (healthy fats) is vital for the production of muscle-building testosterone. Protein is made up of amino acids which are the building blocks of muscle.
As for how much protein, I don't know how much is needed to build muscle, you'll have to wait others that are building muscle to respond since I'm losing fat. I've been eating around 1g per kg of bodyweight (more or less) and I've been preserving my muscle while losing fat, so I guess you'll have to eat more than that, however I think in the beginning at least more than 3g per kg of bodyweight is probably overkill, but like I said, wait for another answer.
To get protein in, you have to eat high-quality protein foods. The most common are meats, eggs, milk, cheese, fish. Of course different kinds of meats, cheese and fish.