Al-jawab billahi at-taufeeq (the answer with Allah's guidance)
Masturbation leading to ejaculation breaks the fast. (Without ejaculation, it does not.) However, it does not require expiation (kaffara). [Shurunbulali, Maraqi al-Falah ; Ibn Abidin, Radd al-Muhtar ]
Masturbation is prohibited and sinful, especially in Ramadan. One must repent sincerely to Allah Ta'ala and commit not to return to this error.
Allah Ta'ala says : "Say: 'O My slaves who have transgressed against themselves (by committing evil deeds and sins! Despair not of the mercy of Allaah; verily, Allaah forgives all sins. Truly, He is Oft-Forgiving, Most Merciful'. [39:53].