Diablos literally translates to "devils", but in this song, it's used as a dramatic intensifier in questions, just like saying "the hell" or "on earth" in English.
Becky G repeatedly asks, "¿Cómo diablos...?" (How the hell...?) and "¿Por qué diablos...?" (Why the hell...?), demanding answers about why her relationship ended. Learning this word is a great way to understand how Spanish speakers add frustration and emphasis to their questions in everyday conversation.
Becky G takes on the frustration of getting dumped by a cheating ex in "COMO DIABLOS". She opens with a dramatic medical diagnosis: "Me diagnosticaron que este mal de amor / Es pa' toda la vida" ("I was diagnosed that this lovesickness is for life"), complaining that neither pills nor alcohol can close the wound. What really drives her crazy is the unfairness of the breakup. In the chorus, she demands answers, asking "¿Cómo diablos fue que tú le hiciste / Pa' estar feliz cuando yo sigo triste?" ("How the hell did you manage to be happy when I'm still sad?"). The phrase "¿Cómo diablos...?" is a great Spanish idiom that works just like "How on earth...?" or "How the hell...?" in English.
Instead of moping forever, though, she flips her mood fast. She hypes herself up with "Yo sé que del uno al diez yo soy un fuckin' cien" ("I know that on a scale from one to ten, I'm a fucking hundred") and calls him out for being "bueno pa' ser infiel" ("good at cheating"). She even drops some Colombian-style slang with "hijueputa" (son of a bitch), making it clear that while they might hook up again ("nos volvemos a comer" / "we'll eat each other up again"), he lost any chance of being her official partner ever again. It is angry, confident, and delightfully petty.