When boys masturbate they feel the pleasure by the ejaculation of sperm. If the ovum doesn't come out when girls masturbate then what makes them feel pleasure?
Boys feel pleasure from the touching of the shaft of the penis, the scrotum, and light touches of the glans at the end of the penis. The sensation builds to the point of orgasm, which is an intense feeling of pleasure that is accompanied by the ejaculation of semen. Thus the ejaculation doesn't cause the pleasure, but the the pleasure triggers the ejaculation.
Girls feel pleasure from the touching of the vulva (the lips), the first inch of the vagina, and light touches to the clitoris which is equivalent to the glans on boys. They too experience orgasm when the pleasure builds, but they don't release anything at orgasm.
The ovum is a woman's egg. A woman releases one egg per month fourteen days before the beginning of her next blood flow. The release of the egg is independent of sex; it happens whether sex takes place or not.