Question: I have a number of projects that could benefit from JavaScript. I've seen a lot of "Oh, you can use JavaScript for that!", but little detail about how and where that's done. Does the script live on a server somewhere or is it just embeded with a cut-and-paste via the "edit HTML source" button?

Looking for some guidance on the best place within the sites/farms from which to run scripting.

Answer: 
Technically, the scripts can reside anywhere as long as the users have read access to them.

In practice, client side solutions usually have a short lifecycle, and you'll certainly want to place them in a location that you can easily update. A good option is the Style Library within a site collection, which has the added benefit of caching the files. If you have internet access, you could also consider using a CDN to call popular files (like jQuery.js).

On the pages themselves, you can add the scripts to either the master page or via a Web Part, depending on the scope of your customization. Here are some explanations from my blog if you use Web Parts:

<http://blog.pathtosharepoint.com/2010/10/27/about-scripts-web-parts-and-urban-myths/>

[Update] I just came across this fresh article:

<http://techtrainingnotes.blogspot.com/2012/05/adding-javascript-and-css-to-sharepoint.html>

Note that the above links only show some basics. There are several more ways to include scripts, especially if you work with Master pages.
Here are a couple resources you may find useful:

[The SharePoint & jQuery Guide](http://sharepointhillbilly.com/Lists/Posts/Post.aspx?ID=16)

[SharePoint Client-Side Development with the JSOM and jQuery](https://vimeo.com/29124752)