I was reading the book foundations of machine learning by Mehryar Mohri, Afshin Rostamizadeh and Ameet Talwalkar, and I came up with this definition of generalization error:

I dont understand what this means. I would like a more formal explanation of what they mean by the notation
$$ \mathbb{P}_{x\sim \mathcal{D}} [h(x)\neq c(x)]. $$
Maybe I'm wrong but does this mean that given a random variable $X$ taking values in the domain of $c$ with distribution $\mathcal{D}$ the generalization error is
$$ R(h) = \mathbb{P}[h(X)\neq c(X)] $$
Again, I just want a formal definition of what they are referring to. I understand the intuitive idea of the definition, they want to measure the probability of model $h$ being wrong when classifying.