Vape pens are designed to heat the contents without burning them. The DMT and its base agent (usually e-liquid) are heated just enough to convert into a vapor where they can then enter the lungs for absorption. Vape pens typically heat the active ingredients to around 400ºF (204ºC).
DMT can also be smoked, but the high heat (over 1500ºF or 900ºC) destroys a lot of the viable DMT and produces potentially harmful byproducts.
Vaping is considered safer, less harsh on the throat and lungs, and more efficient than smoking.