It depends on what weapons you're using. What you need to do is punch through the hull at the location of a module to hit it. Whether or not you do go though depends on the ship you're targeting and the penetration value of your weapons. For example, beam lasers are very bad at this, but railguns with a super penetrator secondary will basically core out the interior of a target ship before the hull goes if you aim right. (I should mention super pen doesn't increase penetration chance, but does allow you to hit multiple modules in a single shot, otherwise your shot damages the first module you hit and stops there).
Assuming shields have dropped, hull hardness is the defence against this. This is a fixed value for each ship and the bigger the ship, the higher the value.
And yes, kill the shield generator, no more shields, kill the thrusters and NPCs drift away helpless, kill the FSD and the target can't jump out, kill the powerplant and the NPC will switch a bunch of modules off to compensate, but keep going and their ship eventually goes pop regardless of the status of the hull.