An aerosol-generating device, comprising: a housing having a chamber, an induction coil disposed around at least a portion of the chamber; a heating compartment for receiving an aerosol-generating article, the heating compartment being detachably insertable into the chamber of the housing, the heating compartment comprising a cavity configured to receive at least a portion of the aerosol-generating article; and the aerosol-generating device further comprising a heating element arrangeable within the cavity of the heating compartment, wherein the heating element extends into the cavity in a longitudinal direction of the cavity, and wherein the heating element is configured to penetrate an aerosol-forming substrate comprised in the aerosol-generating article and received in the cavity, wherein the induction coil together with the heating element form an induction heater, wherein the heating compartment comprises a first open end configured to receive at least a portion of an aerosol-generating article, and a second, base end disposed opposite the first open end, wherein the first open end and the base end of the heating compartment are connected by side surfaces, the side surfaces comprising openings, wherein the side surfaces of the heating compartment comprise locking elements and the chamber of the housing comprises recesses corresponding to the locking elements of the heating compartment to facilitate a snap-fit when the heating compartment is inserted into the chamber of the housing, wherein the heating compartment comprises a press button configured to allow release of the snap-fit connection. a housing having a chamber, an induction coil disposed around at least a portion of the chamber; a heating compartment for receiving an aerosol-generating article, the heating compartment being detachably insertable into the chamber of the housing, the heating compartment comprising a cavity configured to receive at least a portion of the aerosol-generating article; and the aerosol-generating device further comprising a heating element arrangeable within the cavity of the heating compartment, wherein the heating element extends into the cavity in a longitudinal direction of the cavity, and wherein the heating element is configured to penetrate an aerosol-forming substrate comprised in the aerosol-generating article and received in the cavity, wherein the induction coil together with the heating element form an induction heater, wherein the heating compartment comprises a first open end configured to receive at least a portion of an aerosol-generating article, and a second, base end disposed opposite the first open end, wherein the first open end and the base end of the heating compartment are connected by side surfaces, the side surfaces comprising openings, wherein the side surfaces of the heating compartment comprise locking elements and the chamber of the housing comprises recesses corresponding to the locking elements of the heating compartment to facilitate a snap-fit when the heating compartment is inserted into the chamber of the housing, wherein the heating compartment comprises a press button configured to allow release of the snap-fit connection.