First of all you have to figure out which ship you would like to buy, for this purpose the CEDR or Core-Exiles Data Repository is the best source of information, but remember that it might not list all the ships available in the game. After you find a ship you like and have the credits to buy it, you must locate the shipyard that sells it and once there you must enter the store and purchase it from the list the shipyard gives you.
An alternative way to purchasing ships is with tokens. These can be bought in the official CE Store. Once bought you must go to a shipyard and when you select the ship to buy instead of purchase you click "Use token" and then you get the ship. Warning: all token are valid for a single ship, so you cannot use the same token over and over to buy ships.