To use the second screen on PS4, you'll need to download the PS4 Companion App on your smartphone or tablet. It's available for both Android and iOS devices, so you're covered either way! Once you've downloaded the app, just follow the prompts to connect it to your PS4.
The app will ask you to sign in with your PSN account, and then you'll be able to use your device as a second screen. It's pretty straightforward, and you'll be up and running in no time. You can use the app to view maps, check stats, and even use it as a keyboard for typing messages to your friends.