dB (decibel) is a relative measure. It's not a physical unit. Decibel relative to what? The answer is:
Relative to power
dB (decibel) is a relative measure. It's not a physical unit. Decibel relative to what? The answer is:
Relative to power
dB is a ratio. dBx is with respect to the reference level x.
Originally, it was a power ratio, but it has since become common to also use it for a voltage ratio, and regardless of the impedance levels.
When it's used for a level, it should also have a value for x, the reference level. However in many fields, the reference is assumed. In acoustics therefore, we often see dB (my kitchen fridge says it has a noise SPL of 38 dB), when dB(20uPa) is meant.
Other common reference levels are dBm (milliwatts) and dBuV (microvolts).
dB is a ratio of two power levels (at least originally). Common practise is to give it a suffix indicating what the reference level is, so for example dBm is power relative to 1mW, dBW is power relative to 1W, dBu (see note, this got overloaded in an unfortunate way) is (in the RF world) dB relative to 1uW.
Power gain and loss are of course unitless and thus are naked dB.
Now you note that the decibel is a ratio of POWER, which in electrical systems requires a certain voltage (or current) into a specified resistance, so for example 0dBm is 1mW which is ~0.775V RMS into 600R which was an old school telephony standard. Modern systems often use bridging loads and it is sometimes useful to pretend the dB is a voltage ratio not a power ratio, so we get things like the abomination that is the other use of dBu (We pretend the load is 600 ohms and calculate based on the voltage, the u standing for 'unterminated'). This also lets you do things like quote the voltage gain of a power amplifier in dB even if the reality is that it has a 10k input impedance and might be driving 1,2,4,8 ohms or whatever. We just pretend that the input and load impedance are equal rather then quoting a different power gain for different load impedances.
A common source of confusion is the factor of two between calculation on power ratios, 10 log (P1/P2), and voltage ratios 20 log (V1/V2) but these two things are of course equivalent, you double the voltage the power goes up four times...
It is relative to any reference value you want to use to know how your value compares to the reference.
The reference point is arbitrary. Per Wikipedia the reference level most commonly used for sound in air is 20 μPa which roughly corresponds to the sound of a mosquito flying 3 meters away.