This article explains how to use the PS4's Share Play feature to share games and play multiplayer games with friends.
How to Share Games on PS4
Here's how to share games on your PS4 using Share Play. You'll need a PlayStation Plus subscription to start a Share Play session, but your friend won't.
Start the game you want to share and quickly press the Share button on your controller to open the share menu.
Select Start Share Play from the Share menu.