Pulley and Two Masses: Why is the acceleration the same? Say you have a massless string going over a pulley attached to a cart on a frictionless surface one end, and a hanging mass on the other end.
What guarantees that the cart and the hanging mass accelerate at the same rate? The net force is the (sum of the masses)*(accelerations), so why couldn't the cart  accelerate much faster than the hanging mass.  If they were connected by something rigid, I think I could understand, but in this case, I absolutely don't. 
 A: The important idea here is that an "ideal" string does not stretch; its length stays constant. Therefore, the distance between the two objects attached to the string, as measured along the length of the string, is fixed. In some sense, the string is acting like the rigid object you mention since the "along the string length" remains the same.
So, in your case, if the hanging mass moves downward by, say, 3 cm, then the cart must also move horizontally by 3 cm. If they didn't move the same amount, then the string would be stretching or it would become loose. Now, since the displacements of the two objects (in their respective directions) must be the same in any given time interval, the velocities must be the same (just divide by a short time interval and take it to zero). Likewise, the accelerations must be the same as well since the velocities are the same.
I'm being a bit sloppy here with directionality and vectors, but I hope my point gets across.
In your original question, you argue that intuitively it doesn't make sense if you examine Newton's second law. It seems you are implicitly assuming that the net forces on the two objects are the same in order to say that the accelerations could be different. This isn't the case (unless they happen to have the same mass). In fact, their accelerations must be the same for the reason stated above.
A: The only thing that makes both the cart and the mass  accelerate in the same magnitude is the existance of the geometrical constraint, that is the massless string has no change in length. If such a constraint doesnot exist, this may not be the case. Now, to help you understand what i mean, lets think of a different situation, involving a non rigid string. Lets consider a rocket moving in space came across a rock. Suddenly the astronauts attached one end of a stretchable string to that rock. Now, tension would build up in the string, when the seperation between rocket and the rock exceeds its length. Lets assume we can control the rocket's propulsion systems such that it maintain a constant speed $S$. Therefore at any point of time there is no net force on the rocket.But, the rock experiences a force, as long as it their seperation is greater than the string's natuaral length (non zero acceleration). So, there we are... Unequal  accelerations if the string is stretchable
A: ΔS= (V0)t+at^2/2
where ΔS represents the displacement, V0 represents the initial speed, and a represents the acceleration.
Like BMS said, the ideal string does not stretch so ΔS is the same for both.
also, V0 is 0 for both since they start from rest. And t is the same because they start moving at the same time.
Now, ΔS,V0 and t are the same for both, a must be the same too.
A: The string here is assumed to be inextensible, so one end of the string cannot accelerate faster than the other when the string is taut. 
This means that the mass and the cart have to move at the same speed because they are tied to the same string and if one increases it's speed the other has to as well. 
So if one end (let's say, the hanging mass) suddenly starts to accelerate downwards at a certain value, the cart will also accelerate at that value, because the whole string accelerates at that value (because it cannot stretch).
A: In problems like this the "pulley" and the string are inert.  The only purpose of the string and pulley are to create a geometrical orientation of the moving mass elements relative to the direction of gravity and possibly other boundaries (more geometrical constraints).
Since the string cannot stretch during movement a displacement of mass 1 by ds must be accompanied by a displacement of mass2 by ds, both in the same time, dt.  This makes v1 = v2 and a1 = a2 as constraints.  Where these velocities and accelerations are measured along the direction of the string (not as vectors relative to a set of coordinates).  In fact once you understand this reading of the total input force causing acceleration to a system becomes easy by inspection.  In any one of these problems the rope is strung through a series of redirecting pulley like disks or cylinders and the masses are either hanging or siting on flat wedges, with or without friction.  For simplicity assume no friction.  One can define directions locally along the rope and perpendicular to the rope.  Define a direction along the rope and add up all the external forces along the rope, this must equal the total mass of the system times the common acceleration.     
