If you don't know how to set the path, here's how.
1. Type "edit the system environment variables" into the start menu and click the result.
2. Click 'Environment variables...'
3. Find Path or PATH in the system variables list. Edit it.
4. Append a semicolon to the list if one is not present, and add the file path of the JDK bin (%programfiles%\jdk1.#.#_##\bin) - Don't put %programfiles%, put the actual program files directory which you can find by typing %programfiles% into explorer, and replace #'s with the JDK version.
5. Save, click OK, etc. and open command prompt. You should be able to type javac FileName.java and have it compile.