A figure or object of ridicule and laughter.
Laughing-stock is now usually written as a single hyphenated word, but it was previously the two-word phrase, 'laughing stock'.
It's moderately old and there are at least two citations of it dating back to the 16th century. John Frith's, An other boke against Rastel, 1533:
"Albeit ... I be reputed a laughing stock in this world."
and Sir Philip Sidney's, An apologie for poetrie, 1533:
"Poetry ... is fallen to be the laughing stocke of children."
The age of the phrase may be the reason that it is often linked with the practice of putting people into stocks as a punishment. The stocks were a means of punishment in use at the time the phrase was coined, by which people were tortured or ridiculed. Victims were held by having their ankles, and occasionally the wrists too, trapped in holes between two sliding boards. The punishment, although not as harsh as the pillory, in which people were confined by the neck, was severe and certainly not intended to be humorous.
Stocks and pillories are no longer used a means of punishment. More recently, it's become commonplace at school fairs and charity events to put volunteers into stocks and pillories and throw wet sponges at them. This is for humorous effect of course and has no doubt added to the idea that 'laughing-stock' originated this way.
The stock in question isn't that though. It refers to the meaning of stock as 'something solid that things can be fixed to', that is, a butt or stump. So, 'laughing-stock' is just the same as 'the butt of the joke'.
It may be that the association between 'laughing-stock' and the practise of ridiculing people in the stocks grew over time. There's no reference to that in any of the early citations of the phrase though, and it seems clear that isn't the way the phrase originated.