When a massless string is pulled by a force from one end, tension arises due to the internal forces acting between segments of the string. The tension is constant throughout the string if it is not accelerating, as shown by the equation T1 = T2, indicating that the net force on each segment is zero. If the string has mass and equal forces are applied at both ends, the tension remains equal to the applied force F, preventing acceleration. However, a truly massless string cannot exist under these conditions without leading to infinite acceleration. Ultimately, the discussion emphasizes the importance of recognizing simplifying assumptions in physics to avoid complex and unphysical scenarios.