How is revving done?

If it is in a vehicle you push on the gas and brake at the same time