A machine (M, M', M", M′′′) for machining workpieces made of wood, plastic, metal, fibreglass, glass and the like, comprising: a logic control unit provided with at least one predetermined program for machining said workpieces; at least one tool-holder, to which a tool can be coupled for machining said workpieces according to said machining program, said tool-holder being provided with at least one identification means comprising information; at least one tool crib (4, 4a, 4b, 4c) for housing said at least one tool-holder, when not in use; said machine (M, M', M", M′′′) comprising a device (5, 5', 5") for reading and writing said information comprised in said at least one said identification means of said at least one tool-holder, designed to detect said information and send it to said logic control unit for determining the association and the coupling between said tool and said at least one tool-holder necessary for the execution of the machining program by said tool coupled to said at least one tool-holder; wherein said information comprised in said at least one identification means also comprises machining data of said tool, said reading and writing device (5, 5', 5") being able to update said machining data of said tool; wherein said reading and writing device (5, 5', 5") is movable with respect to said tool crib (4, 4 a, 4 b, 4 c); said machine (M, M', M", M′′′) also comprising at least one movable machining head with a mandrel, to which said at least one tool-holder can be coupled by means of said mandrel, characterised in that said reading and writing device is arranged on said machining head; in that said reading and writing device is coupled to said machining head by means of a supporting structure movable integrally with said machining head, in that said supporting structure comprises a rod which is vertically movable along an axis Z parallel to the axis of rotation of said mandrel in such a way that said reading and writing device can be lowered to be positioned facing towards said tool-holder coupled, in use, to said mandrel, for reading the identification means, and in that said a rod is rotatable about said axis Z in such a way that said reading and writing device can be positioned facing towards a tool-holder housed in said tool crib. a logic control unit provided with at least one predetermined program for machining said workpieces; at least one tool-holder, to which a tool can be coupled for machining said workpieces according to said machining program, said tool-holder being provided with at least one identification means comprising information; at least one tool crib (4, 4a, 4b, 4c) for housing said at least one tool-holder, when not in use; said machine (M, M', M", M′′′) comprising a device (5, 5', 5") for reading and writing said information comprised in said at least one said identification means of said at least one tool-holder, designed to detect said information and send it to said logic control unit for determining the association and the coupling between said tool and said at least one tool-holder necessary for the execution of the machining program by said tool coupled to said at least one tool-holder; wherein said information comprised in said at least one identification means also comprises machining data of said tool, said reading and writing device (5, 5', 5") being able to update said machining data of said tool; wherein said reading and writing device (5, 5', 5") is movable with respect to said tool crib (4, 4 a, 4 b, 4 c); said machine (M, M', M", M′′′) also comprising at least one movable machining head with a mandrel, to which said at least one tool-holder can be coupled by means of said mandrel, characterised in that said reading and writing device is arranged on said machining head; in that said reading and writing device is coupled to said machining head by means of a supporting structure movable integrally with said machining head, in that said supporting structure comprises a rod which is vertically movable along an axis Z parallel to the axis of rotation of said mandrel in such a way that said reading and writing device can be lowered to be positioned facing towards said tool-holder coupled, in use, to said mandrel, for reading the identification means, and in that said a rod is rotatable about said axis Z in such a way that said reading and writing device can be positioned facing towards a tool-holder housed in said tool crib.