Each Xbox 360 game has to be specifically made compatible (probably a wrapper or something) - but it's also not a complete rewrite. You can't just stick in every 360 disc and play it.
The PS4 has no backward compatibility whatsoever. Allegedly, it's too complicated, and given the odd CPU the PS3 had, which is probably difficult to emulate, there's some credence to it. The PS3 originally had backwards compatibility to the PS2 with a dedicated chip, but they left it out in later versions for cost reasons.
Thanks for the clarifications.
Even with the need of this wrapping/re-packaging it is great that Xbox has this feature. At least for good titles that will not be ported to the newer console.
Indeed, I remember the PS3 compatibility case and the - justified - rage it brought when this compatibility was removed by Sony. Had no idea where the PS4 stands.