Gaining muscle is an extremely slow process. Your body adds muscle very slowly, and even if you do everything right, you can't change that. It takes years to gain a significant amount of lean weight.
The most important thing about gaining muscle with a minimal fat gain is to gain your weight slowly. If you simply gain weight too quickly, it will be unhealthy, and will add a lot of unnecessary fat mass. We recommend keeping it to about 1-2 pounds per month. It might seem slow, but it does add up over time. While gaining muscle, you need to stay really patient.
Along with that, you will obviously want to continue your exercise and keep a healthy diet. In order to achieve the slow and gradual weight gain suggested above, you will only need a little bit of extra nutrition on top of what you eat to maintain your weight. Just a few hundred calories in addition (along with enough protein and other nutrients) should allow you to have a slow weight gain.
We suggest exercising with strength training included, at least 3 or 4 days a week. This will help use your small calorie surplus to gain muscle and lean weight.