The modern game of hearts is likely descended from two different games: Reversis and Four Jacks.
The goal of Four Jacks was to avoid winning any trick containing a jack. In this game jacks were penalty cards, worth one point each, except jack of spades, which was worth two.
The game of Reversis became popular in Spain around 1750. In Reversis, there was a penalty for each trick that was won, plus additional penalties for winning the jack or queen of hearts. Over time Reversis added penalty cards, until all the hearts were penalty cards. Around 1850, it morphed into a game that is a recognizable version of modern day hearts. In this variant, all the hearts were worth one penalty point.
From the simple version of hearts, the game continued to evolve adding features to improve the game play. One variant of simple hearts sprang up that was called Black Maria, where the queen of spades was a 13 point penalty card. This variant soon became the normal way to play. Later, the idea of shooting the moon was added in order to keep the game interesting.
In 1920, the notion of the jack of diamonds being worth -10 points was introduced. From there the game was refined further. Passing, breaking hearts, and leading the two of clubs on the first hand are all recent additions.