The first step when removing the valve stem of your bike is to remove the valve cap. The valve cap, present at the top of the valve stem, is used to keep dirt and debris from entering the valve.
Once you have removed the valve cap, place it in your pocket or some small plastic bag, since it is very small in size and can be easily lost.
Now with the help of a valve stem removal tool, give the valve stem several counter clockwise rotations until it has been detached from the tire. This will cause the air to come out of the tire tube.
Put the valve stem in the Ziploc bag with the valve cap, as it is also a small piece that can be easily lost.
Wait until the tire deflates completely. Once the tire has been completely depressurised, fix a new valve stem in the place giving it clockwise rotations, initially with your fingers and then using the same valve stem removal tool.
Inflate the tire with the help of an air compressor and fix the valve cap on the top.