Cocaine and stimulant (amphetamine) use are similar in the extent that they both act directly on the dopaminergic neurological brain pathways and are linked to the 'reward/learning' pathways of the brain, albeit in slightly different manners.
Cocaine inhibits dopamine reuptake while amphetamines stimulate excess dopamine release. The euphoria associated with both is directly related to the stimulation of the 'reward' centres of the brain - whilst short lived in cocaine, the excitatory effect is so high as to induce strong urges to repeat.
Often associated to social use and combined with alcohol, further risk and risk of heart attack is exacerbated by the creation of cocaethylene - a substance created in the liver in combination to cocaine, which contributes to a longer high associated with the drug.
As cocaine stimulates the cognitive and verbal centres of the brain, inducing social activity, coupled with alcohol while a relaxant - the dual use and attraction is clear. However, the risk is much increased, the worst of which can be sudden death.