Explaining the definition about greatest common divisor, what do they mean up to the equivalence relation? The definition of gcd is provided below: 

Let R be an principal ideal domain. Let a,b ∈ R. Then there is a greatest
common divisor of a and b, that is, an element d that divides both a and
b and such that if c divides both a and b, then c divides d. The element d is
unique up to the equivalence relation ∼ (a ∼ b if a and b are associate).

Here, a ~ b means a|b and b|a which was proved to be an equivalence relation.

My question is what do they mean by "up to the equivalence relation ~"?

Thanks in advance.
When you have an equivalence relation you separate the set into equivalence classes.  Just as $d$ divides $a$ and $b$, so does any associate of $d$.  Any of the associates of $d$ would work as well.  As an example, in the Gaussian integers, the units are $1,-1,i,-i$ and the associates of a number are the number multiplied by these.  Once you know, for example, that the GCD of $8$ and $3+3i$ is $1+i$, you know that $-1-i, -1+i, 1-i$ are also GCDs and that is all there are.  All the elements of the equivalence class are GCDs.
It means that this statement is true as long as a and b are not equivalent.