Your Total Kills, Total Score, and Total Accuracy transfer over. Your totals for individual game types, such as the leaderboards for Team Deathmatch, Domination, Kill Confirmed, etc do not transfer over.
You must have a Call Of Duty account, which can be set up or signed in to under Barracks > CoD Account. This is what links your stats to both consoles as well as the Ghosts App.
When you first play, you don't see your stats. But after playing one game with a valid linked Ghosts account, your stats will repopulate.
If you ever go back to PS3, the stats will still be the same as before you started playing on PS4. Just play one game for it to update your stats. Any stats gained on PS3 after you activate and link your PS4 account will also be added to your stats after one game.