When they make a die, they have a HUB with the design as it is on the coin, and they stamp the die from the hub.
In a Double Die you have an error in the die, and until that error is noticed and the die is thrown away, you have every coin produced with the error. Eventually, if it is not found, the die fails as part of its natural life cycle, and the double die stops being produced. This is also why you will have some years with different kinds of double dies. If there is more than one die created as a double, there will be more than one variety. If there is any rotation in the die between strikes on the hub, there will be a Double Die. The design will be doubled in part where the variation is greatest.
Machine doubling is when you use a normal die and the die chatters against the blank causing a slight doubling of the image. Sometimes, if the design calls for the blank to be struck more than once, there will be machine doubling if the coin rotates between strike one and two. Machine doubling is caused by the production process and is very common. It becomes more common as the die wears out.