Take the magazine out and cycle the slide several times to MAKE SURE THE PISTOL IS EMPTY.
Repeat, MAKE SURE THE PISTOL IS EMPTY.
Point the pistol in a safe direction and pull the trigger.
At the rear of the slide, there is a small keyhole-shaped cutout; you need to press in on that cutout, and while keeping it pressed in, lift up on the rear of the slide.
While doing so, make sure the rear of the slide is also pointed in a safe direction, as the firing-pin (under spring tension), can and will be propelled backwards at a high enough speed to take an eye out.
Once the rear of the slide is up, you can ease it forward and take it off the front of the barrel.
Reassembly is in reverse order.