Calculating tension in a cable or string requires analyzing the specific problem at hand. In equilibrium situations, the tension at one end of the string matches the gravitational force acting on the object, such as a lamp, resulting in tension equal to mg. When considering a cable with mass, the tension increases at the attachment point to account for the combined weight of the lamp and the cable. For massless cables, tension remains constant throughout, but this changes in accelerating systems or when friction is involved. Understanding the underlying concepts is crucial for accurately determining tension rather than just applying formulas.