A method for connecting and separating a front part and a rear part of a machining head for thermal and/or mechanical machining of workpieces, the machining head extending along a longitudinal axis L the front part comprising at least one nozzle with an opening, which during operation has thermal and/or mechanical energy for workpiece machining leaving it, the rear part connected or connectable to operating-media supply devices the front and/or the rear part comprising a drive device and the front part being moved relative to the rear part toward one another for connecting purposes and being moved relative to the rear part away from one another for separating purposes.