enqueue the scripts

Add your script to a file inside your Theme root, e.g. /js/my-script-name.js.

In functions.php, put add a function to enqueue your script:

function mytheme_enqueue_some_script() {
    if ( ! is_admin() ) {
        $scriptsrc = get_template_directory_uri() . '/js/my-script-name.js';
        wp_register_script( 'my-script-name', $scriptsrc );
        wp_enqueue_script( 'my-script-name' );
    }
}

Then, hook that function into the wp_enqueue_scripts hook:

add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_some_script' );

If your script is dependent on any other scripts, we can add that information to the wp_register_script() call.

For further reading: