Best way to gain weight is joining the gym , doing HIIT workouts and train all muscle groups. Feed the body through a protein rich diet and get enough rest.
You can try getting a mass gainer if you are unable to reach a calorie count sufficient for weight/muscle gain.
There are a lot of videos in the internet but i think the main point is to train properly and eat more than u think u need to ! Junk food is acceptable , but if you do not train and eat junk food u will get more % body fat so be careful !