I found this image on one of the answers I was going through. In this picture since the man balances himself in the middle of the rope, there's equal tension throughout it. However if he would have been standing at the end there must have been unequal magnitude of tension at both the ends of the rope, if the angles would have been of different magnitude. But since it is an ideal string it must have equal tension throughout so why there's different tension in its different parts?
since it is an ideal string it must have equal tension throughout
Why is that the case? If we imagine a small segment of string (massless and inextensible), then for it to be stationary, the acceleration must be zero and the net forces must be zero. In the middle of a string, the only forces are the tension from either side, and gravity. Since we've declared the string to be massless, then we ignore gravity and declare the tension on both sides equal.
So for all parts of the string that are not impacted by some other force, this holds. We can even add an ideal pulley, a device that can provide forces normal to the string, but will add no forces along the string. In such a case, tension remains equal throughout.
But the walker here adds forces to a portion of the string, and some of those forces are parallel to the line of force from either end. This modifies the forces felt by that segment, and the tension to keep the net force zero is no longer necessarily equal.