There are three core principles to parent/child theme logic in WordPress:
-
functions.php
files from both parent and child get executed during load, with the child one first (this is a little counter-intuitive so worth remembering). -
“Template directory” refers to parent theme and “stylesheet directory” refers to child theme. If no child theme is being used they are same and both refer to single current theme.
-
Each template file is first looked for in child theme, then in parent theme. Note that this natively works for template files only and not theme files in general (such as arbitrary files with PHP code).
So for modification of template files they are typically copied over to child theme and edited there.
Modification of other files is case by case and depends on availability of hooks and how flexible parent theme is about that specific functionality.