Steel by Carrie Vaughn

Time travel, swordplay, and romance combine in an original high-seas adventure from New York Times bestseller Carrie Vaughn.

It was a slender length of rusted steel, tapered to a point at one end and jagged at the other, as if it had broken. A thousand people would step over it and think it trash, but not her.
This was the tip of a rapier.

Sixteen-year-old Jill has fought in dozens of fencing tournaments, but she has never held a sharpened blade. When she finds a corroded sword piece on a Caribbean beach, she is instantly intrigued and pockets it as her own personal treasure.

The broken tip holds secrets, though, and it transports Jill through time to the deck of a pirate ship. Stranded in the past and surrounded by strangers, she is forced to sign on as crew. But a pirate's life is bloody and brief, and as Jill learns about the dark magic that brought her there, she forms a desperate scheme to get home—one that risks everything in a duel to the death with a villainous pirate captain.

When story begins, Jill is a moody girl, constantly feeling sorry for herself. But when she's forced into a hard life on a pirate ship, Jill's outlook changes dramatically. She's a hard worker and compassionate. Vaughn's pirates are not overly dramatized nor made into Hollywood-like heroes. Though at times Jill's captain makes heroic choices. The pirates are still thieves and murderers, yet governed by a democracy of sorts, live by a code, and cherish their freedom.