Classically, a lot of weight trainers (well bodybuilders really, which I'm not), used to do bulk and cut cycles. Bulk is where you're effectively eating more calories than your body requires, with the idea that those extra nutrients will help repair the muscles which have been effectively "damaged" by the exercise - that repair adds muscle/strength etc... Lifting weights and so on causes micro tears in your muscle fibres.
However, a lot of people are under the misconception that gaining lean muscle mass, and keeping lean, or even losing bodyfat is impossible. So effectively, by getting your diet right, and eating just the right amount of food, and the correct foods, you can supply your body with the nutrients it needs to function/repair, and build new muscle, but without the propensity for it to store fat. There is a bit of a dichotomy to this idea, as some of the foods that tend to help the storage of fat (carbs) cause insulin spikes, which, if used correctly can help enhance the anabolic effect of training. Insulin is an anabolic (not androgenic) hormone, and if manipulated carefully in your diet can promote muscle building. However, where a lot of people go wrong is by ignoring it's also negative effects, fat storage. Insulin is basically a hormone designed to shuttle things around your body, and reacts to glucose (which is what carbs are broken down into).
Anyway I digress.
So lean bulking is something which I've been trying to master for years - and am slowly getting the hang of it. It's been a bit of trial and error, and I've had varied results, however at the moment I seem to be heading in teh right direction.
I could very easily sit at 17st, be monsterously strong, and still look "pretty good"... but I'm just no interested in that any more, I like my functional strength, I also like my fitness. So whilst I can still lift big, I'm not bothered about being "big".
It's probably easier to have built my strength and muscle mass initially, and hold onto it whilst chiselling away at the fat, rather than start off skinny and build it up... but it is possible, you just have to be patient (i.e. it takes years).