Flakka affects the brain by increasing the release of dopamine, a neurotransmitter associated with pleasure and reward. It also inhibits the reuptake of dopamine, leading to intense euphoria, heightened alertness, and erratic behavior. Prolonged use can result in cognitive impairment, psychosis, and other mental health issues.