机件 is the technical term for the inner parts of machines — gears, shafts, valves.
零件 (língjiàn) is more general ('spare part / component') and far more common in everyday speech.
部件 (bùjiàn) is closer to 'subassembly'. Use
机件 when the engineering register matters.