first you need to make sure you have no underlying problem for example-
thyroid, malabsorption syndrome, and other s. this may be simply lack of enough calories in your diet. meet a good nutritionist to advice on high calorie diet to help you gain weight. also improve your muscles by good physical training.