You replace the parts that are worn out. That will usually be internal parts like bearings and piston rings. It is silly to go through all that work to get to those parts so it is customary to rebuild the entire engine since it will be mostly apart that far anyway. The rebuild will include new gaskets, a valve job, and lots of machine work and cleaning. There's nothing you are going to do without training, time, the service manual, and lots of expensive specialty tools.