Hi Andy -
Welcome to the stimulating world of PHP.
PHP began as a quick-and-dirty scripting language, and many (most?) people still use it that way - coding straight into the HTML, as you say. For simple tasks, that's often the quickest and easiest way to get things done.
However, people have devised lots of different tools to help keep larger projects structured; some are excellent. Smarty is a popular library for separating application logic from presentation logic, for example. There are tons of libraries for this and other purposes, ranging from simple, lean widgets to full-fledged web programming environments. I guess these latter would qualify as "frameworks", though I don't use them myself.
What OS are you using on your development workstation? Apache is very easy to set up in Windows. Getting it to play nice with PHP and MySQL is a little trickier, but it really just boils down to editing a couple of config files and making sure certain .dll files are in the right places (and making sure you're using compatible versions of the software). Uh, okay, maybe it is kind of complicated 🙂
If you're coming from Java, you'll definitely want to use PHP5 (if you have the option; I'm still stuck with PHP4 where I work). PHP5 has a far superior OOP implementation, and lots of other goodies.
Also be aware that PHP juggles type, meaning that variables change data type depending on context. You can concatenate a string onto an integer, for example, without explicitly converting the integer to a string first. Or you could add a string and an integer: "34" + 7 = 41 in PHP.
This behavior makes code easier to write for newbies, but can get annoying at times - especially if you're used to a strongly typed language. Be aware of the difference between the == and === operators, and their kin! "4" == 4 evaluates to true; "4" === 4 evaluates to false. Personally, I hate this aspect of PHP, but it's probably not going away any time soon.
Lastly, PHP is not designed to enforce any particular structured programming model; unless you're conscientious, it's entirely possible to create hideous abominations that will strike terror into the hearts of all who are cursed to maintain them. It's also possible to create elegant, maintainable, efficient, highly modular, highly scalable code. But it's up to you to keep things neat.
Good luck! Feel free to post questions!