How does someone get cardiomyopathy?

Many different ways. Cardiomyopathy is weakened heart muscle contraction. Most common cause is prior heart attacks. However, there are many other potential causes: alcohol (or cocaine) abuse, viral infection (especially coxsackie virus), genetic mutations in certain cardiac structural proteins, uncontrolled hypertension or diabetes, hiv, and toxins such as certain chemotherapy agents are some of these.
Cardiomyopathy. Born with it, viral or other infection, toxic, metabolic, coronary artery disease, valve or shunt problem, trauma and others.