Ok, as for the actual upgrading. You would have to research if any BIOS updates from HP enabled later processor support. It could very well likely be the case that they did simply because it would have allowed them to keep using the same motherboard over multiple years, while keeping the latest generation of products inside to keep them looking "NEW" to consumers. You would additionally want to research forums where other people have upgraded your specific model... try googling "cpu upgrade for hp pavillion model # etc" (insert your model)
What some of the others have stated is, while you probably can do an upgrade to your computer, it's not exactly the wisest or most worthwhile choice to make... yes... you will be able to get "some" improvement, but if you look at performance vs cost, then thats where it doesnt make much sense, and hence.. switching to a different platform/processor is the only true way to get a significant improvement.. the issue that creates is, it is considerably more expensive to go that route over a simple processor upgrade.
What types of things do you currently use the computer for? Have you always been unhappy with how it performed, or did it really slow down over time? What kinds of things do you plan to do if/when you upgrade?