Detergent: This is added to the samples in order to lyse (break open) the cells so the DNA is released.
Salt: This can be used as part of the lysis step (to osmotically burst the cell) but is always used to help precipitate the DNA after it's been released from the cell.
Alcohol: Once the salt is bound to the DNA, it becomes insoluble in alcohol, causing the DNA and salt to precipitate out of solution and form a pellet at the bottom of the tube. You usually wash this pellet 1 or 2 times with fresh ethanol to remove excess salt before using the DNA for the next application.
Collectively, this is a DNA extraction and an ethanol (or isopropanol) precipitation...the precipitation is done at the end of almost every DNA extraction to concentrate and clean up the DNA before using it.