Original: He was given these names after his father (Juan de Borbón), grandfather (Alfonso XIII) and maternal grandfather (Prince Charles of Bourbon-Two Sicilies).
Simplified: His name came from his father (Juan de Borbón), his grandfather (Alfonso XIII) and his mother's father's name (Prince Charles of Bourbon-Two Sicilies).