Being in HR I can say some companies check and some don’t, they just take your word.
If they check, they either call your previous company, or hire a background check service to call, and then provide them with the release you probably signed to start the background check.
Typically, it doesn’t matter though, as most companies are only willing to confirm your job title and dates of employment. Most organizations don’t want any liability in releasing your info, so they simply don’t do it, even with the signed release.
A big part of it might be that companies don’t want their local competition to know what their standard pay rates might be.