Confusion about tension and disk 
Why are the two tensions not equal? I thought tensions on two ends of a cord are always equal.
And are the motion of the disk caused by friction force due to the motion of the cord and disk surfaces?
 A: Your two questions are related.  If the pulley has a mass, and we want it to start rotating, then there there must be a net torque on it:
$$
\sum \tau = I \alpha.
$$
The support from the pin does not apply a torque to the pulley (by assumption, it is frictionless) so the torque on the pulley will be
$$
\sum \tau = T_1 R - T_2 R
$$
and we can see that if we want $\alpha \neq 0$ then we must have $T_1 \neq T_2$.
Conversely, for a "massless" pulley, we can treat the moment of inertia $I$ as being negligible.  This then implies that we have to have $(T_1 -T_2)R \approx 0$, or $T_1 \approx T_2$.  If you're taking an introductory physics class, you may have only encountered this case so far, and it may not have been explicitly explained why this was the case;  but now that you know about rotational motion, you can see why the tension in a rope must be constant when the mass of the pulley is very small.
A: Here is a related question that tells you why the force is the same if the pulley is massless and rotates without friction. Why is the tension on both sides of an Atwood machine identical?
Typically the pulley is assumed to be massless and frictionless in beginning chapters of a physics class to make the problem simpler. It does make the problem unrealistic, but this kind of problem is hard enough to be instructive without additional complications. Note that the pulley is assumed to turn without friction, but the rope and rim are assumed to have enough friction to make the pulley turn.
In later chapters, you have learn more, and the complication can be added in. If the pulley does have mass and there is enough friction that the rope does not slip, the rope must turn the pulley as the heavier weight descends. Various parts of the pulley accelerate because of the force on the rope.
This is a little like what would happen in the referenced post if there was a mass in the middle of the tug of war. You could calculate the tension in the two halves of the rope. You would find two different values.
It is similar for the rotating pulley, but you calculate the effect of the tensions pulling on the rim with torques and moment of inertia, as Michael Seifert shows.
A: Because of friction between the cord and the disk, you can think in terms of two separate cords. The tension is the same at each end of each cord, but $T_2$ is greater than $T_1$. Write force equations for each hanging mass, and a torque equation for the disk, You will need to calculate the rotational inertia for the disk.
A: 
And why can the disk can rotate without friction? If there is no force on it, how can it rotate?

They don't mean that there is no friction between the cord and the disk (it says that the cord cannot slip, so there is friction there), but that there's no friction between the disk and the pin/axle (or that it is negligible, so that you can ignore it).

Why are the two tensions not equal? I thought tensions on two ends of a cord are always equal.

As others have pointed out, since the cord cannot slip (meaning also that it cannot freely stretch and slide over the surface of the disk), it's kind of like it's affixed to the disk (perhaps it's easier to think that way when it's a static situation). There are two separate strands of the cord on each side, and each of them is pulling on the disk, so if you think about it, if both of them pull on the disk with the same force, working against each other, the disk can't begin to turn.
