A degree of freedom is an independent variable that describes some property of a system. The number of the collection of these independent variables that are required to completely describe a system, are called “the degrees of freedom of the system”. For each constraint that you impose the degrees of freedom reduce by one. For example, for an ideal gas in a closed container, there are the variables of “volume”, “pressure” and “temperature”, which can take any positive value. But, the three of them are not independent, because they are related by the state equation, so one variable can be expressed as a function of the other two. So the ideal gas has two degrees of freedom.