The thick string is tied to the weight ( can of beans)
The free end of the string is then wound around the rolling pin and the end left loose.
When you lift the rolling pin as long as the string stays in contact with the rolling pin for a couple of turns then the can will be lifted.
Its like a ships windlass.or capstan.
[There is enough friction between the rolling pin and the string to support the weight of the can. A larger weight can be supported too as the increased tension in the rope increases the friction too.]