The decibel is a dimensionless number that can express the ratio between two power levels. If we have, for instance P1 and P2
Power ratio(dB)=10*Log(P2/P1)
if the power P2 is the double of the power P1, that is P2=2*P1, then:
Power ratio(dB)=10*Log(2*P1/P1)=10*Log(2)≈3 dB
It works also using absolute dB unit (that means number that have dimension of power), such dBW, dBm and so on.
For instance dBm is the power referred to 1mW:
P(dBm)=10*Log[P(W)/1mW)
if we have, like before P2=2*P1, then the difference between the two levels, in dB will be:
Power ratio(dB)=10*Log[P2/1mW)-10*Log[P2/1mW)=10*Log[2*P1/1mW)-10*Log[P2/1mW)
using the Log properties:
Power ratio(dB)=10*[Log(2)+Log(P1)-Log(1mW)-Log(P1)+Log(1mW)]=10*Log(2)≈3 dB