Please explain, at atomic level, What is happening inside a string when a tension force is created?
Atoms form molecules, and molecules are arranged to make structures such as strings and things. There are generally-attractive electromagnetic forces between atoms which bond the atoms into molecules. These are generally strong. Chemical action, at a minimum, is needed destroy molecules by changing the electrical potential energy of the system.
When you make solid things, you orient the molecules to form a static shape. Intermolecular electromagnetic forces hold these things together, but they are much weaker than the bonds holding the atoms to each other. That's why you can tear paper or break strings, but those actions don't change the paper or string into separate carbon, hydrogen, and other trace elements.
Now, consider a string, which is a thin array made of several lines of molecules "attached" by electromagnetic forces. When an external force pulls on one small section, trying to separate that section of the string from its neighbor, the internal forces at the interface of the sections oppose that attempt. That effect is transferred down the string. If the string eventually reaches a state of not accelerating, the tension will be, to first order, uniform. If the string accelerates, the tension will vary along the length, but for small-mass strings attached to large masses, we ignore the variation.