Methanol is first converted to dimethyl ether (DME) through a dehydration reaction. DME then undergoes further dehydration and rearrangement reactions to form a variety of hydrocarbons, including olefins. The zeolite catalyst facilitates these reactions by providing active sites for the chemical transformations. Finally, the olefins are separated from the reaction mixture and purified for further use.