Understanding the Three States of Matter