JBoss AS 4.2.x is a J2EE application server. By default, it bundles JBossMQ messaging service as the JMS provider, but you can replace that with JBoss Messaging.
If you visit the JBoss Messaging project there are detailed instruction how you do this (it's easy).
JBoss AS 5.0.x has JBoss Messaging as the default JMS provider.
but if it has some sort of JMS provider, why somebody needs to replace it with JBoss Messaging?
It's a matter of choice, really, you don't *have to* upgrade. You can stick with JBossMQ if that works well for you.
JBossMQ is our legacy implementation, well debugged and tested. It's phased out however beginning with JBoss 5. JBoss Messaging provides better performance/characteristics in clusterred environments and more.
But as I said, for simple usage, JBossMQ will be more than ok.