Space pirates. You know you love 'em. Those likable scoundrels with hearts of gold. Okay before I induce mass vomiting let's get to the real question: where do pirates get their ships?
D'uh. They steal them. Well yes. That's one way. But there's a bunch of them. Believe it or not pirates can pay for their ships too. In fact that may be the preferred way since you usually attack ships not equipped to pt up a fight. You are picking weakly defended choice targets to maximize your plunder vs. repair bills, right?
Needless to say when I say pay it is with someone else's money. Maybe yours.
The first and easiest way to grab a ship is to default on your bank loan. After all if you're going to be a pirate (or smuggler) you're going to have to get used to breaking the law. This is a sort of get your feet wet move. The drawbacks are that banks do not often give loans for warships meaning you have a small freighter or scout which is not going to inspire fear in your victims (despite all those boss .gifs you intend to transmit to them). Also when a ship goes missing the first thing banks think is 'deadbeat' and they quickly go through all legal (and some illegal) channels to get the ship back.
Make your disappearance look good. Crash a lifepod somewhere with a low passenger aboard who didn't make it. Send a distress call and fake a boarding action or just throw some wreckage out near the jump limit.
The second method is hijacking. This could get you a fighting ship. The problem is that fighting ships do not usually carry passengers. That means getting hired, securing working passage or being a stowaway. All of this requires skullduggery, acting and possibly honest work. It also requires either an outside ship ready with a prize crew or more than one hijacker to fly most ships into the sunset. Extra hijackers compounds the difficulty of remaining undetected. An outside ship runs the risk of being discovered and shot up in a boarding action if things go wrong.
I wrote enough on boarding actions. Basically any pirate attacking a ship to seize it better have a bunch of trump cards in a stacked deck or he won't be repeating it too many times.
Mutinies are a special case. This would be a prime way to seize control of a mercenary cruiser or other warship. Some the crew or troops take over, marooning or killing the rest. The benefit is you start out with a warship and with less damage than you'd inflict disabling it then boarding. You also start with a crew of fighters. More importantly mercs sometimes rake in the big bucks meaning the ship is paid for or taken as a prize. That means the bank will not be looking for you and on the Frontier that's almost everyone you need concern yourself with. Just watch out for any friends of the former owners with ships of their own.
Very rarely a pirate may find a derelict ship. This may seem like a bonanza. Till you start wondering what happened to the crew and what is wrong with the ship. You may find that a perfectly functioning ship with a missing crew is not a good thing at all (especially if I'm running the game.)
But then there is the ancient practice of barratry. Barratry refers to a ship captain defrauding ship owners or causing them damages. Some captains will sell a ship to interested buyers. What the hell, it isn't his ship and he could net several million, enough to retire on some pleasant backwater. The pirates get a ship without having to get shot at and the few million paid out is better spent on a bribe than medical equipment and damage repairs.
The final way to get a ship is to build it which can be either the simplest or the most complicated. A privateer is a mercenary given a license to plunder the ships of a hostile power. In this case the pirate/privateer attacking you may have started life legally in your enemy's shipyards.
Pirates do operate some secret shipyards in deserted systems. After all pirates need their yearly maintenance. Some prize ships may be upgunned or older ships modified. Showing up at a commercial shipyard just won't do. A pirate who manages to convert his stronghold into a shipyard is likely set for life. He can charge his peers exorbitant rates and retire from risky boarding actions. these pirate bases are quite rare and when the Navy or Scouts bust one up they crow about it for months (or even longer if it wasn't abandoned).
The other sort of shipyards work for their bloodthirsty clients in plain sight. A ship will come in with registration numbers and transponders faked for servicing or fueling. Only the most corrupt governments will knowingly service pirates in exchange for shares of loot. Only the most totalitarian regimes will have hopes of keeping this secret for long. Ever wonder why the local jerk-tator always seems to have spies following your crew around? Maybe they aren't just his spies. Maybe the friendly captain having his ship overhauled in the pit next to yours is not to be trusted. Maybe some people should wonder what their tax dollars are spent on?
On a final note, don't worry about those Bank/Pirate conspiracies where the bank hires pirates to capture ships close to paying off their mortgages, by them back for a fraction of their value and then mortgage them again. Pirates are not in collusion with banks.
Pirates have some standards after all.