Where is the hymen? Also when masturbating and get about 5inches up it gets reallypainful where is this and what's happening?

At opening of vagina. The hymen is a membrane at the opening of the vagina. It often gets torn before first intercourse. If you can reach 5inches up your vagina, your hymen is gone. You may be feeling your cervix, which is the end of the uterus. Movement of the uterus is painful to some women.
At vaginal entrance. Or only -2 mm inside. Your hymen was either not prominent, ruptured or torn if you havn't felt it or seen it if you examine yourself with a mirror. Thus inserting up to 5 inches has you > 4 3/4 inches beyond the hymenal ring. The painful spot 5 inches in is probably your cervix. Majority of women find that stimulation of the clitoris is a pleasanter from of masturbation than dildo insertion.