Electronic stability programs (ESP), also known as stability control, provide an important safety net in everyday driving but generally don't allow sideways fun. Unless you get creative, that is.
In this video, the Team O'Neil rally school shows how to drift a car with ESP on. This is something you can do primarily through driving technique, albeit with ESP and traction control dialed back as much as possible, and on a loose surface.
Some cars have ways to turn off ESP, or at least make it less intrusive. Whether it's engaging a different drive mode or simply pressing an "off" button, disabling what you can is the first step. Even if the car indicates that ESP is turned off, it may still be active to some degree, but leaving more leeway before it intervenes.
For this demonstration, Team O'Neil used an all-wheel-drive Ford Explorer police car with selectable drive modes. In this case, the instructor recommends using the "Mud/Ruts" mode because it often deactivates the traction control. Many current SUVs have a similar mode, so keep that in mind if you want to drift your daily driver.
When you're underway and find a drift-worthy spot, turn in hard and fast. The abrupt application of steering can essentially trick the ESP. In this decade-old Ford system at least, a steering-angle sensor registers large amounts of steering input, while a yaw sensor shows little actual turning. So the system will try to make the vehicle turn more by braking one wheel, producing a bit of rotation.
Once you start sliding, avoid countersteering to keep this effect happening. If things start to go wrong, you can always countersteer to bring the ESP back. That's an advantage of trying to drive around it instead of permanently disabling it, which is what Team O'Neil does for its rally cars.
Another option is the pendulum technique driving schools suggest to cancel out understeer. Quick left and right steering inputs can create enough momentum to break the rear end loose, but you'll need enough space for the back-and-forth slaloming this requires.
It's important to keep in mind that these are generic tips, however. The setup of ESP varies between manufacturers and vehicles, and vehicle behavior can vary based on a number of factors, from weight and center of gravity to tires and power delivery. So a bit of experimentation may be required.