JavaScript is confused with Java because of the name. In the early nineties Navigator had one of the first scripting programs built into its browser which was called Livescript. At the same time a true programming language called Java was making headlines and waves. So in a bold move by Netscape they decided to cash in on the popularity by renaming their scripting program from Livescript to JavaScript. (A very microsoftic move.) So that is where the name JavaScript came from. The difference between Java and JavaScript is that Java is a true programming language whereas JavaScript is a scripting language. It's main purpose is web based and it is a lot simpler than Java.
A scripting language is separate from the program with which it interacts. Scripts are read by a program such as a browser and that browser will interpret and implement what that script tells it to do. This is different from a program which can execute independently from any other application. A script needs to be read and decoded by a program. Scripts are accessible to the end user and therefore they can be adapted to the users needs.
From what i was able to find JavaScript has gained in popularity due in part to it becoming a more standardized language much in the same way that HTML and CSS have. And also that is has gained far more browser support. It also has undergone a few name changes and then there was the difference between Microsoft's version and Suns version. I read some articles where it is being used in a lot of different non web based programs. I couldn't understand a lot of the acronyms they were using but it sounded impressive and gave me the impression that it was not only being used more extensively but also that it was going to continue to develop and change in structure.