To generally build muscle, you need to train hard as shit, but the diet is what will get you the results. You generally can't build muslce without gaining some fat. You don't have to turn into a Large Marge, but you also can't expect to be as lean as a professional bodybuilder on competition day. I guess depending on your expectations & time frame, you can keep your fat building lower by adjusting your diet, but you won't build serious muscle on a calorie limited diet. You can however "tone" and create the illusion of more muscle by leaning out. If you are looking to build muscle seriously, then you need to approach it with a bulking diet and be OK with gaining some extra bodyfat and then go into a cutting diet to lean back down, but not lose muscle.
As far as whatever your frame is, again you need to start with a diet that is geared to wards achieving whatever your muscle / fat goals are and tweak it accordingly. You can make amazing transormations of a shape, but most people are going to experience some limitation by their natural shape.