When you sign into PlayStation Network, your friends can see if you’re online and get notified when you sign in if they have selected the When Friends Go Online option.
If you don’t want your friends to see that you’re online, you can choose to appear offline even if you’re signed-in to PlayStation Network. Your friends will see your status as offline and will not be notified when you sign-in to PlayStation Network, even if they have asked to be told that you’re online using [When Friends Go Online].
To appear offline:
Go to [Profile] > [Online Status] to toggle between appearing offline and online.
Your avatar on your PS4 home screen shows the icon that your friends can see right now:
If you have [Appear Offline] enabled your appearance will not change even if your PS4 is powered down or you sign out and back into PlayStation Network. Of course, if you have [Appear Offline] switched off, you will only appear online when your PS4 is on and you are signed into PlayStation Network.