What does my textbook mean by "potential energy" while defining internal energy of a system? 
Recall that thermal energy is an internal energy that consists of the
kinetic and potential energies associated with the random motions of
the atoms, molecules, and other microscopic bodies within an object.)

I thought internal energy $Q-W$ depends only on temperature (ignoring phase changes) and that the potential energy/bond dissociation energies are irrelevant in thermodynamics. They are useful in chemistry/QM. Perhaps my textbook meant gravitational potential energy. Has anyone know seen this before?
My textbook is Fundamentals of physics by Halliday
 A: For monatomic gases the only form of internal energy is translational i.e. the kinetic energy of the atoms. However for molecules we can also have rotational and vibrational energy as well as the translational energy.
Each active rotational mode gets $\tfrac12 kT$ of energy just like each translational mode. However each active vibrational mode gets $kT$ of energy because we get $\tfrac12 kT$ associated with the kinetic energy of the vibrational motion and another $\tfrac12 kT$ associated with the potential energy of the vibrational motion. I would guess that Halliday is referring to this.
A: Potential energy is irrelevant only when the system includes an ideal gas since in an ideal gas the atoms don't interact  with each other or there is no intermolecular forces in an ideal gas and I think you have been confused between ideal gas behaviour and real gas behaviour.
In a real gas , the molecules have intermolecular forces i.e. force because of the electrons and protons and little force due to masses. Since they interact with each other they have potential energy too .
Hope it helps .
