Very easy. First get your new switch. They are only about $25. Dealers typically stock them.
It'll pry straight out of the dash, but I have found it easier to pry out the blank next to it (or driver's power seat switch if your car is so-equipped). Then you can reach a finger in behind the hazard switch, and pop it and its wiring connector straight out. Unplug the connector, swap the switch, plug the connector back in and snap the new switch back into the dash. A nice little hook or pick is helpful, be careful not to scratch the plastic trim.
Takes about two minutes.