If you are a young man, the cause will be mainly psychogenic. This condition is related to stress, job problems, familial issues ... It can be helped by getting into the mood and also by some Ginseng based drugs.
Erectile dysfunction in older persons is multifactorial, and can be affected by drugs, high cholesterol, diabetes, vascular problems and other conditions.
A baseline lab tests that includes also testosterone level must be done.
Erectile dysfunction could then be treated depending on the cause.
Several drugs available in the market could help to get stronger erections. The first line treatment are PDE5 inhibitors.