When a liquid is heated, what happens to the particles near the source of heat?

They freeze

They become more dense

They gain energy and become less dense

They sink to the bottom

They gain energy and become less dense