Praise be to Allaah.
Firstly:
Masturbation, or what is called the secret habit, is haraam
because of the evidence which has been explained in the answer to question
number 329. If climax is reached
as a result, it is obligatory to do ghusl (full ablution).
There is no particular expiation for masturbation, but it is
obligatory to repent from it, by giving it up, regretting having done it and
resolving not to go back to it.
Secondly:
If doing the secret habit is accompanied by climax, then this
invalidates the fast and prayer is not valid unless you do ghusl.
If it was not accompanied by climax, then your prayer and
fasting are valid.
Thirdly:
If a person masturbates and is ignorant of the ruling that it
is obligatory to do ghusl afterwards and that it invalidates the fast, does
he have to make up the prayer and the fast? There is a difference of opinion
among the fuqaha’ concerning that, but the majority are of the view that it
is obligatory to make them up. Some scholars are of the view that it is not
obligatory. See the answer to question number
50017.
In order to be on the safe side, you should make up the fast
of those two days, if climax was reached.
With regard to prayer, you should do a lot of naafil prayers
and righteous deeds, but we do not think that you are obliged to make them
up.
Fourthly:
You should know that there are signs of reaching puberty and
that a girl may reach puberty before the age of 15, if she starts to
menstruate or if any of the other signs of puberty appear. For more
information on that, please see the answer to question number
20475 and
21246.
What happened to you emphasises the importance of seeking
Islamic knowledge, which is something that is easy to do nowadays, praise be
to Allah.
We ask Allah to guide us and you and make us steadfast.
And Allah knows best.