What is the origin of internal potential energy ? How does it affect a substance?

The attraction between molecules is the source of internal P.E. It results in change of distance between the molecules. Increase in internal P.E. increases distance between the molecules.