Thermodynamics uses macroscopic properties of chemical systems to classify the physical state of the chemicals and to predict what might potentially happen to these chemicals when they undergo change. As the name implies, thermo (heat) + dynamics (change or motion) is concerned with changes in heat and other forms of energy that occur when a chemical system changes its state. The field is relatively old, dating from the late 18th and early 19th centuries, but it remains very powerful today. It can be used to find, among other things:
Before we begin our study of thermodynamics, let's get a few definitions straight. The system is the official thermodynamic term for the part of the universe you are specifically interested in describing or measuring. The surroundings is everything else in the universe - every single thing that is not specifically part of your system. Practically speaking, you can approximate your surroundings by anything that can give or take away energy from your system and ignore the rest of the universe. All our systems will conserve mass and, therefore, will be closed - we will not add or remove any mass from them. The chemicals comprising the system are allowed to react, so we will not necessarily end up with the same molecules in the system at the beginning and end of our study. However, the mass in the system cannot change and the atoms that make up the molecules will have to remain the same throughout our experiments, even if their chemical bonds rearrange during the process. Systems that can take in or lose mass are called open systems; they are open to the addition or loss of matter.
Remember that thermodynamics uses macroscopic properties to classify chemical systems. It certainly is interesting and informative to consider why atoms and molecules behave the way they do, but the field of thermodynamics is not concerned with microscopic explanations! Thermodynamics does not consider bonds or electrons or crystal structure! Thermodynamics is only concerned with how the system behaves as a whole. For pure systems, those that contain only one single chemical component like oxygen (or water or sodium chloride), we will use temperature (T), pressure (P) and volume (V) as these macroscopic properties. For systems containing two or more components, like air (or sugar water or concrete), we will have to include the amounts of each component in the mixture as well.
To describe a system completely - in other words to identify unambiguously the chemical and physical nature of the materials you want to study - you need merely specify the chemical or chemicals involved, how much of each you have and two of the three values: T, P and V. These values define the state of the system. Regardless of the changes your chemical system has undergone or how it was produced, as long as it ends up in the same state - the same composition at the same T, P and V - it will have the same thermodynamic properties at the beginning and end of the changes. Because changing the temperature, pressure and volume changes the state of the system, we will call T, P and V the state variables.