To buy a ship, you find someone selling one (such as a faction or other sites like Centerpoint above) and you send them credits and they send you the ship. You may also want to use a middle (a trusted player that holds bother sides of the trade before passing them on) to ensure that the person you are buying from doesn't just take your credits and run off.
____________
Year 12 Day 333 15:37
Tarrick Tugrina
Deleted by Tarrick Tugrina. Reason: I no longer need a ship. I now have one
Might get lucky getting an X-Ceptor (very good chance someone would be just wanting to get rid of it after they got a shielded one from BS), but very little chance of getting a freighter for that much
Oh, and this is the wrong forum for this anyway, you want the Commerce thread
Check the Commerce Threads, even give the Gambling Hut and/or Auction House a browse (there is one Gambling thread going at the moment for just 250k with the chance to win several million or 7 ships, if you don't mind risking half you pay {but hey, that's why it's called "gambling" :D})
You can also check out the CentrePoint Market (don't have the link and probably spelt the name wrong anyway, coming from a nation that is influenced by both Europe/UK and the US makes spelling confusing at times :P)
Another option is to check the Rules and look for a ship you like, and contacting the faction that produces them direct
Cheapest ship you can buy are ugly fighters which go for 100-200k per. Cheapest freighter is a Zeta class shuttle which will set you back about 1.5 mil. Captial ships go for 100'000'000 up.
An example is my YT-1300, which is a good ship to use for personal transport and storage. That cost me 3.5 million credits.