How does "Restrict background data" setting work ?

The "Restrict background data" Android setting is enforced by the OS and designed to restrict mobile data usage.

When this restriction on data is enabled, apps won't be allowed to access the cellular network unless they are running in the foreground, i.e. the user is interacting with them. Note that they will still be able to access the network when Wi-Fi is enabled.

Restricting the background data on certain apps, like the Google Play Store, for example, will prevent them from checking for updates in the background while using mobile data, but won't restrict them while you're using Wi-Fi.