Typical thermostat are connected with 2-8 wires depending on the type of thermostats. A heating only thermostat uses 2 wires which 1 on/off switch.
Heat/Cool Thermostats typically use a 4 or 5 wire connection. R it the 24 volt power to the thermostat , Y sends the cooling command to the start the compressor on the AC , G switch the fan relay in the furnace & W starts the burner. For electronic thermostat, there should also be a 5th wire which is connected to the common of the 24 volt transformer.
The heat pump thermostat connection have a couple extra wires. The O/B is used for the reversing valve that switches the outdoor unit for heat to cool or cool to heat. It depends on the manufacture if the reversing valve is powered in heat mode or cool mode.
Heat Pumps typically have a secondary heat source. Electric back up or Gas back up wired as 2nd stage heating or emergency heating mode.
If you only have 4 wires and trying to install a electronic thermostat that requires common connection then the control wire should be replaced. If the wire cannot be accessed then there are alternative methods.
Use a battery power thermostat option. A lot of electronic thermostats have 2 AA or AAA batteries that keep the thermostat powered during a power outage to keep the memory programmed. Most of these type of thermostats will work with or without the common wire connection. The batteries will last a couple years, but when the battery dies, the furnace will stop.
There are also 3 party wire cheaters, that can be use which are similar to a power stealing type thermostat but will trickle voltage to the fan relay wire , not recommended but they do work.
Another option is the communicating type thermostat that will only need 2 or 3 wires and a 2nd part is installed at the equipment to switch the loads. These are more expensive but work well.
Some of the older electronic thermostats use ” power stealing ” design which trickles a small amount of voltage to the W connection to keep the thermostat powered. These worked OK on the older furnaces but should not be used on any newer furnace that use electronic circuit board. If you replace your furnace make sure you replace any older electronic thermostats.