The easiest solution is to put it in your functions.php
file in your theme’s directory. All the code in functions.php is automatically executed when the theme is active.
If the code in the file gets too much you can choose to divide it in smaller files and include those files in functions.php
EDIT
You should change your provided code snippet to the following
function wpse_228333_customize( $wp_customize ) {
$wp_customize->add_control(
'copyright_textbox',
array(
'label' => 'Copyright text',
'section' => 'example_section_one',
'type' => 'text',
)
);
}
add_action( 'customize_register', 'wpse_228333_customize' );
EDIT 2
The problem with the code is that a control won’t show up if the attached section doesn’t exist. Also there is not a setting created that the control actually controls.
The code snippet below is a fully functional customizer section that adds a text field
function wpse_228333_customize( $wp_customize ) {
/** First add a setting to be controlled / changed */
$wp_customize->add_setting( 'wpse_228333_copyright_text' , array(
'default' => '',
) );
/** Now add a section to put all your customizer controls in */
$wp_customize->add_section( 'wpse_228333_section' , array(
'title' => __( 'My Custom Section!', 'text-domain' )
) );
/** Now add a control to the previously made section to control the previously added setting */
$wp_customize->add_control( 'wpse_228333_copyright_text_control', array(
'label' => __('Copyright text', 'themename'),
'section' => 'wpse_228333_section', // Corresponds to previously made section
'settings' => 'wpse_228333_copyright_text', // Corresponds to previously made setting
'type' => 'text'
));
}
add_action( 'customize_register', 'wpse_228333_customize' );