Intuition behind Gaussian copula and its simulation algorithm My question is related to the answer in this post.
The definition of the Gaussian copula is easy to understand and the simulation algorithm as well, but I do not see how does the two relate. 
My question is why does the following algorithm (where $P$ is a correlation matrix)


*

*Perform a Cholesky decomposition of $P$, and set $A$ as the resulting lower triangular matrix.

*Repeat the following steps $n$ times.


*

*Generate a vector $Z = (Z_1, \ldots, Z_d)'$ of independent standard normal variates.

*Set $X = AZ$

*Return $U = (\Phi(X_1), \ldots, \Phi(X_d))'$.



Simulates the Gaussian copula
$$
C_P(u_1, \ldots, u_d) = \boldsymbol{\Phi}_P(\Phi^{-1}(u_1), \ldots, \Phi^{-1}(u_d))
$$
What is the intuition that explains why that algorithm works to simulate the copula?
In addition, is there a link between $U$ obtained in step 2.3 and  $(u_1,...,u_d)$ in $C_p$?  If so, what is it?
I am simply trying to understand why the two relate. There is no need to explain what the algorithm does nor what a copula is.
 A: Step 2 produces a set of correlated Gaussians:
$\text{Var}(AZ) = A \text{Var}(Z) A^\top = AIA^\top = P$
At that point you have a sample from a distribution that has the dependence structure of a Gaussian copula but doesn't have uniform marginals -- the marginals are all standard normal -- so it has the right copula but isn't itself a copula.
At step 3 you produce uniform marginals by transforming each marginal to standard uniform (because $F_X(X)\sim U(0,1)$); transforming marginals has no effect on the copula. At this point we have samples from a multivariate distribution whose dependence is given by the correct copula and which has uniform marginals. That is, we are sampling from the copula.
The $u$'s in the copula function are effectively just arguments, so that you can see where you are in the function (consider $F_Z(z)=P(Z\leq z)$ by comparison -- $z$ is just where you're evaluating $F$; $Z$ is the random variable); but the $U$'s that they 
"carry" the copula of are certainly related to the U's in the algorithm in that the random U's in the algorithm are realizations of those random variables. 
