Any type of sweet or water-ice which is supplied on a stick.
'Lolly' is a very old sailor's word for soft sea-ice, and the term 'lollipop' for a type of sugar sweet is known at least since the mid 18th Century (OED). It is not clear when the sticks arrived.
'The London Chronicle' of January 1784 has; "She confessed..that a certain person..had enticed her to commit it [sc. the robbery], and given her sweetmeats, called lolly-pops." and the 1796 'Grose's Classical Dictionary of the Vulgar Tongue'; "Lollipops, sweet lozenges purchased by children."
There is a ludicrous tale, prevalent in the USA, that lollipops, and their name, were invented there in 1908 by one George Smith.