Question: how to find the direction of tension in a string?
Answer: The direction of tension is the pull which is given the name tension. Thus, the tension will point away from the mass in the direction of the string/rope. In case of the hanging mass, the string pulls it upwards, so the string/rope exerts an upper force on the mass and the tension will be in the upper side.