Reading from the Child Themes Codex, we get this information:
[…] your child theme can override any file in the parent theme: simply include a file of the same name in the child theme directory, and it will override the equivalent file in the parent theme directory when your site loads. For instance, if you want to change the PHP code for the site header, you can include a header.php in your child theme’s directory, and that file will be used instead of the parent theme’s header.php.
Extra care must be taken when modifying functions.php file. If you create a new functions.php in your Child Theme’s directory, it won’t override the functions.php from the Parent Theme, but loads in addition to it — and that’s a good thing. Child Theme’s functions.php is loaded before Parent Theme’s functions.php so you even can override functions in the Parent Theme’s functions.php. However, functions located in that file must be firstly prepared to be overridden by a function with the same name from Child Theme’s functions.php.
It is usually done by wrapping the function in an if clause such as:
// functions.php — Parent Theme
if ( ! function_exists( 'my_function' ) ) :
function my_function() {
}
endif; // my_function
That means that the function my_function() should only be defined if it has not been defined earlier (for example, in Child Theme’s functions.php as they are loaded before)
Thank you Rastislav Lamos!