Before replacement, you might try a few other steps. Try opening the valve and letting it snap shut a few times. If that doesn't do it, next step, clean the rubber seal. Mineral deposits and bits of toilet paper can cause the seal to fail. An old toothbrush can be used to scrub along the seal, holding the flapper open. Go to a home improvement store and buy some plumber's silicon grease. Rub that along the seal and see if the water now stays in the bowl.
You can replace the seal, if you don't have a copy of the toilet owners manual, Google the make and model of the toilet and I'm confident you'll much information, including the replacement seal # and instructions. It's not a hard procedure to replace the seal.