JavaScript is the programming language that allows you to make your websites interactive. Despite the name, JavaScript has nothing to do with the programming language Java. The "official" title for JavaScript is ECMAScript, but almost everyone refers to it as JavaScript.
HTML, CSS and JavaScript together form the basis of web design.
Just like with CSS, JavaScript can be inline, internal or external. Again just like CSS, we typically use internal when designing a page, and move to external if designing a larger website. We rarely use inline (exception: when you just need to do something quick, but no extensive javascript).
JavaScript can be placed with the head or the body of the page. When using internal Javascript, we often place it after the body because it's referencing id's, classes, etc. within the body.
<script type=”text/javascript”> ....javascript code...</script>