Enqueue jQuery in WordPress

You’re on the right track, but missing one piece:

add_action('wp_enqueue_scripts', 'my_scripts_method');

add_action allows you to run code at specific times during page loads / specific events. The above action tells WP to run your function when it is adding the scripts to the html head element. Your function in turn instructs WP to add the jQuery script.

The same goes for registering a new script, but with a different hook:

add_action('wp_enqueue_scripts', 'my_register_script_method');

function my_register_script_method () {
    wp_register_script( 'jqueryexample', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jqueryexample.min.js');
}

If you’re overriding a pre-registered script, you should also first deregister that script. I use something like the following code to replace the jquery script (note: read 2nd edit at the end):

function my_register_script_method () {
    wp_deregister_script('jquery');
    wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jqueryexample.min.js');
}

As to where you should put that code. If the code is specific to the theme, you should put it in functions.php in your theme folder. If you’re going to re-use the code on multiple theme’s, it would be easier to maintain a plugin with all shared code.

Edit:
As Stephen Harris notes below, since WP 3.3 you can also use wp_enqueue_scripts after wp_head has triggered, for example in shortcodes or widgets. The js will then be loaded in the footer.

Edit 2:
For jQuery and other google hosted libraries it is recommended that you use http://wordpress.org/extend/plugins/use-google-libraries/
Read the comments for a motivation by Otto.