After you shut off the power, you need to close off the boiler from the system if you have valves to do so. Then you drain the boiler until you can remove the valve without spraying water. The old valve screws out of the hole in the boiler. But a valve with the same rating and size as the original as specified on the boiler plate. The new valve screws into the hole; make sure you do not squeeze the valve out of round as you tighten it. You then fill the system and flush it of air if it is a hot water system.
This can be difficult for the inexperienced, so an experienced professional can be a valuable investment. It appears that this boiler has not been checked for safety in a while.