You start with a perfectly functional starship at the beginning of No Man's Sky, but you're not going to want to keep that thing forever. Here's how to find new starships and what to look for once you find them.
There are two ways to get an entirely new starship: buying one or finding the wreckage of one. To buy a starship, head to a populated area such as a Trading Post or Space Station. Head to one of the landing pads there and wait for a starship to come in. Talk to the pilot, and he'll make you an offer. You'll have the chance to compare the starship's components to your current starship before you confirm your choice. Finding a wrecked starship, on the other hand, is more up to luck. Every so often, you'll happen upon broken-down starships that you can either scrap the parts for minerals or repair yourself.
When you're comparing starships, note the upgrades and bonuses those upgrades provide in comparison to what you have, as investing in a superior starship is a good way to skip over several tech upgrade's worth of progression. Pay attention to the condition of the starship you're trying to buy as well. Look for damaged parts and check the current fuel levels, as they can represent hidden costs that you may not be prepared to pay. Also check how many cargo slots the starship has compared to yours. If it has less than your current starship, then you'll need to think about what you're going to drop or transfer to make everything fit.
A stern warning about confirming ownership of a new starship: Once you do, the new starship is yours, and your one and only starship. The navigation mark that tracks where your starship is at all times will be keyed into the new one. If you're far away from your old starship and you accidentally agree to take a new one, finding the old one could prove impossible, and depending on the functionality of the new one, may even strand you with no working transportation.