Understanding how to use child themes

in all the child theme tutorials, everyone seems to be saying that you only edit the CSS file to create the child theme, and it just pulls all the PHP files, verbatim, from the parent.

But what if i’ve made a lot of changes to the PHP files? I tend to butcher the PHP files just as much as the CSS when customizing a theme. For instance, often I remove the Comment section code from the PHP files because I do NOT want that functionality on the site.

So what do I do in these instances??? How does one handle editing the PHP files??? I understand how it works with the CSS file, in that the child CSS classes override the parent CSS classes. But i’m lost when it comes to what happens with the PHP???