A machine tool comprising: an automatic tool changer for automatically changing a tool attached to a tool rest of a machine tool, said ATC comprising: a robot arm; and a movement mechanism unit moving said robot arm; said robot arm having a base unit coupled to said movement mechanism unit, an arm unit pivotably coupled to said base unit, and a gripping unit provided in said arm unit and detachably gripping the tool, said arm unit being formed to extend in an arm shape from said base unit toward said gripping unit and swinging on a pivot axis as a fulcrum relative to said base unit, wherein said arm unit includes a first movable unit pivotably coupled to said base unit, a second movable unit pivotably coupled to said first movable unit, and a third movable unit pivotably coupled to said second movable unit and provided with said gripping unit, and a first pivot axis between said base unit and said first movable unit, a second pivot axis between said first movable unit and said second movable unit, and a third pivot axis between said second movable unit and said third movable unit are arranged in parallel; said machine tool further comprising a tool rest disposed within a machining area and equipped with a tool automatically changed by said ATC; wherein said movement mechanism unit moves said robot arm in a range of a tool changing position within a machining area, a standby position outside the machining area, and a stocker position outside the machining area; characterized in that said machine tool further comprises a headstock provided within the machining area and rotating a workpiece, wherein a pivot axis of said arm unit is orthogonal to a rotation axis (201, 204) of the workpiece in said headstock; said movement mechanism unit moves said robot arm in a range of a tool changing position within a machining area, a standby position outside the machining area, and a stocker position outside the machining area; and when said robot arm is moved from said standby position into the machining area said arm unit is moved in a space above said headstock in a folded state such that said first movable unit extends in the obliquely upward direction from said base unit, said second movable unit extends in the obliquely downward direction from said first movable unit, and said third movable unit extends in the obliquely upward direction from said second movable unit. a robot arm; and a movement mechanism unit moving said robot arm; said robot arm having a base unit coupled to said movement mechanism unit, an arm unit pivotably coupled to said base unit, and a gripping unit provided in said arm unit and detachably gripping the tool, said arm unit being formed to extend in an arm shape from said base unit toward said gripping unit and swinging on a pivot axis as a fulcrum relative to said base unit, wherein said arm unit includes a first movable unit pivotably coupled to said base unit, a second movable unit pivotably coupled to said first movable unit, and a third movable unit pivotably coupled to said second movable unit and provided with said gripping unit, and a first pivot axis between said base unit and said first movable unit, a second pivot axis between said first movable unit and said second movable unit, and a third pivot axis between said second movable unit and said third movable unit are arranged in parallel; said machine tool further comprising a tool rest disposed within a machining area and equipped with a tool automatically changed by said ATC; wherein said movement mechanism unit moves said robot arm in a range of a tool changing position within a machining area, a standby position outside the machining area, and a stocker position outside the machining area; characterized in that said machine tool further comprises a headstock provided within the machining area and rotating a workpiece, wherein a pivot axis of said arm unit is orthogonal to a rotation axis (201, 204) of the workpiece in said headstock; said movement mechanism unit moves said robot arm in a range of a tool changing position within a machining area, a standby position outside the machining area, and a stocker position outside the machining area; and when said robot arm is moved from said standby position into the machining area said arm unit is moved in a space above said headstock in a folded state such that said first movable unit extends in the obliquely upward direction from said base unit, said second movable unit extends in the obliquely downward direction from said first movable unit, and said third movable unit extends in the obliquely upward direction from said second movable unit.