yes, you want to use jquery for that. You can probably find a plug-in already written if you do a search for something like "jquery menu" or "jquery dropdown". You'll find a ton of options.
The difference between php and javascript is, in the most basic answer: PHP uses data to make changes before the page loads, and to interact with the server/other pages. Javascript can make changes to a page even after it loads but does not interact with the server or other pages. So any kind of sliding or animated elements are likely to be javascript or jquery (or flash or css3 but that is something else entirely). Someone else can probably explain it more in depth or more technically correct, but I wanted to keep it basic as it sounds like you are just getting started.