Sometimes the mental problem occurs first. This can lead people to use alcohol or drugs that make them feel better temporarily. Sometimes the substance abuse occurs first. Over time, that can lead to emotional and mental problems.
Someone with a dual diagnosis must treat both conditions. For the treatment to be effective, the person needs to stop using alcohol or drugs. Treatments may include behavioral therapy, medicines, and support groups.
NIH: National Institute on Drug Abuse