If you are going to use your custom js code then what you have to do is first register your custom script then enqueue it.
Example
function link_my_js()
{
wp_register_script('desired_name',_template_directory().'/assets/js/custom-script.js');
//now enqueue it
wp_enqueue_script('desired_name');
//desired_name(called handle) is what you have given in wp_register_script above
}
now add this in a action hook
add_action('wp_enqueue_scripts','link_my_js');
Place the codes in functions.php
If you want to use this in plugin give correct path on registering the script use plugins_url()
to get the directory path then continue with yours and use it inside the plugin.
If you want to link general main jquery just use the handle name jquery
alone you don't have to register it, because WordPress provides preloaded scripts in the core you can check it Here Default Scripts Included and Registered by WordPress at the bottom. Feel free to ask doubts on this:)