Different devices are used in different contexts when measuring decibels. For example, if you are measuring sound underwater, the decibel ratio calculation will have a different reference number than if you are measuring sound in the air. Basic decibel meters measure the power of a sound in consideration of the threshold of human hearing.
Decibel levels are measured in a highly precise way because even the smallest difference in audio power can drastically shift the number of decibels recorded. This means that decibel meters often can be very expensive.
Decibel meters contain a sensitive microphone that records the power of the sound in its range. Once this sound is detected, it is calculated as part of a logarithmic equation using the ratio of this measurement with the appropriate reference number. Then, the decibel level is shown.