Introduction of dummy variables, or One-hot encoding, is a way to include nominal variables in a regression model.
Say Z is a nominal variable representing occupation, with 3 levels: Doctor, Engineer and Writer, and you wish to include this variable in your regression model to predict income.
To include it in a regression model, you need to somehow convert it into a number. Being a nominal variable, there is no natural ordering that you can use to assign a number to each category. Then, say you use some arbitrary mapping, assigning 1 for Doctor, 2 for Engineer and 3 for Writer.
Now after you fit the model, no matter what coefficient you get, the income for Engineer will always be between that of Doctor and Writer. That is not how you would want your regression model to work, hence this arbitrary mapping is not a suitable way of including nominal variables.
The proper way to include nominal variables is One-Hot encoding.
In One-Hot encoding, if your variable has n levels, you add n-1 columns to your design matrix. In the above example, you would add 2 columns, because there are 3 occupations.
The first column, say ZEngineer you add would be an indicator variable corresponding to Engineer. That variable would take value 1 if the person is an Engineer, 0 otherwise.
The second column, say ZDoctor you add would be a similar indicator, but for Doctor.
These variables ZDoctor and ZEngineer are what are called as dummy variables.
For each level of the nominal variable, there is a unique configuration of dummy variables. Note that, if the variable Z takes the level Writer, both of the dummy variables are zero. Two or more dummy variables do not take the value 1 simultaneously.
In your regression with dummy variables, there are now two parameters for occupation: the parameter for ZDoctor, and the parameter for ZEngineer. These two parameters can take different values, and thus consider nominal variables as unordered.
One question you might ask is, why not three dummy variables, one for each occupation? The answer is that, since exactly one of the dummy variables will be 1 for each person, the design matrix becomes singular if you already have an intercept term in regression.