This is a stock character originating in Italian theater of the 17th century. It’s generally the equivalent to the court jester – a Harlequin is often a servant, known for quick wit, comedy, and getting themselves into complicated situations.
The Harlequin is usually depicted in a diamond-patterned costume, wearing a mask.
Additionally, the traditional Harlequin character had a consistent love interest: Columbina. This seems to be where the association with romance comes from – the Harlequin was always getting in various predicaments due to his pursuit of Columbina.