it depends on type of toilet, at big box diy stores you can get all the pieces to put in a new one-and you can google the how to videos to get it done. first is getting water out of the tank, so you can get a look where to reconnect the flush valve and flapper they are in the upper tank.
Hi Sandra, you can buy a flush kit at your local hardware store, hope this video helps you
I bought a new flush valve kit at my local hardware store ( $10), watched a YouTube video, and seriously fixed it in 10 minutes!
here is how to fix it if the pump is what's making it run -- https://www.charlestoncrafted.com/replacing-toilet-pump/
This should help. https://www.homedepot.com/c/ah/how-to-install-a-flush-valve/9ba683603be9fa5395fab90b7d840ec