Here is a article which tries to uncomplicate pulleys.
Pulleys:
A pulley, also called a sheave or a drum, is a mechanism composed of a wheel on an axle or shaft that may have a groove between two flanges around its circumference.[1] A rope, cable, belt, or chain usually runs over the wheel and inside the groove, if present. Pulleys are used to change the direction of an applied force, transmit rotational motion, or realize a mechanical advantage in either a linear or rotational system of motion. It is one of the six simple machines. Two or more pulleys together are called a block and tackle.
Pulleys are of three types:
SIMPLE PULLEY:
This type of pulleys can be easily solved by this equation:
Accelaration: W1+W2/M1+M2 = Accelaration of each pulley.
Tension: T - M1g = M1a

COMPLICATED PULLEY:
This can be solved using the relation:
TensionX accelaration = constant.
Using this you can develop the forces equations and solving them.
for example,
the block on the table is acted by the tension of the string. let it be T.And lets the block on the table's accelaration be a.
The block which is hanging is acted by 2T then. Let this block's accelartion be a2
Then 2t*a2 = T X a
From this we get that 2*a2 = a.
From this we can form equations and calculate the values of a and t.

The Wierd looking pulleys(sub class of complicated pulleys):
Form constrain relations and then form equations relating a and t. and solve them.

EVEN MORE COMPLICATED PULLEY:
As challenging as these problems might seem to you, even more challenging are these problems if you try to solve them with constrain equations.
The best way to solve these is to replace the whole of the second pulley with its blocks with a block whose mass is 4Mm/M+m.
The obtain the accelaration.Let it be a0 upwards or downwards.
Then for the second pulley:
Put the masses in a box and the suppose the box is moving up or down with a accelaration a0.
then apply pseudo force concept and solve using the simple pulley concept.
I havent copied this from anywhere .. Its straight from my heart. If you like it rate it. If you already know this, no need to be mr. smarty pants.