In order to purchase the KSP on PS4 and/or Xbox One you have to go into the Xbox One or the PlayStation Store and search for Kerbal Space Program Enhanced Edition. Once there, select the game and follow the instructions to complete your purchase. The game will be added to your downloads. Once the download and installation are completed, you can start launching your Kerbals into orbit.
If you have more questions, you can submit a support ticket here.