Here is basic HSRP on two routers sharing virtual IP :
Router A (intended Active):
interface GigabitEthernet0/0 ip address 10.0.0.2 255.255.255.0 standby version 2 standby 1 ip 10.0.0.1 standby 1 priority 110 standby 1 preempt
Router B (intended Standby):
interface GigabitEthernet0/0 ip address 10.0.0.3 255.255.255.0 standby version 2 standby 1 ip 10.0.0.1 standby 1 priority 100
Higher priority wins. Preempt lets a recovered router reclaim Active status.