Are PS4 and Xbox One games compatible with each system?
Is it possible to play Xbox One games on a PS4?
Solution 1:
the Xbox One and PS4 have entirely different architectures and operating systems: the PS4 runs on a heavily modified version of FreeBSD called Orbis, while the Xbox works on what is essentially Windows 10 with a Hyper-V virtualizer so games and non-game software can run in separate environments.
It also means that both machines have a very different API for graphics and general processing, with the Xbox using essentially the DirectX API while the Playstation has 2 APIs: a low level GNL, and a high-level GNMX API.
Because of the above reasons, a game that's developed for the Xbox 1 is designed to talk to the DirectX and Xbox One OS API, and as such wouldn't be able to run on the PS4. The PS4 just wouldn't know how to start the game, and the game wouldn't know how to make the PS4 do stuff.
In theory, it might be possible to develop a game that can work with both Xbox One and PS4 from the same disc, but that would require a lot of effort for something that could just as easily be done by making 2 separate versions using proper tools.
Solution 2:
No. They are completely different systems and are not compatible with one another.