To ease the transition from this gen to the next, PlayStation 4 will let you upgrade select PS3 games to PS4 versions for a fee. Sony has outlined exactly how that will work, and apparently it means the PS4 can recognize PlayStation 3 discs to some extent.
In a detailed walkthrough of the digital upgrade system, Sony explains that there are two ways of going about your upgrade: disc-based and digital. Digital is the simpler route, since it's tied to your account and will automate much of the process. If you go the disc-based route, however, you'll need to input an included voucher code, and then download the game at a discount when it becomes available on PlayStation 4. But to keep you from simply having two copies of the game, you'll need to keep your PS3 disc in the PS4 to play it.