There are few places where you can buy a ship. In every one of them you buy ship from other player.
One is at rpg centre/commerce forum where you can start your thread and tell what you want to buy. Other is trading channel on irc. Then there is centrepoint market http://market.centrepointstation.com/ where traders usually sell stuff at highest prices.
You can also look at webpages of ship factions http://www.swcombine.com/community/factions.php . After you click at the name of the faction on the list, then again when that name is in the middle screen, it moves you to webpage of that faction. Under products or services section on faction website you can see if that faction sells ships.
Cheapest way might be to ask your faction if they can sell you ship or collect CPs and spawn a ship from them.