For tubeless tire, it will seal the puncture permanently as long as there is sealant in the tire.
For tube tire, it can seals for days, weeks, or months depending on tube quality and road condition. I had punctures on my bicycle tube twice a week, and I do not want to change the tube for the third time, so I installed tire sealant, it lasts for a 1 months without pump up, but it might lose some air pressure after days or months for other people, any way we will have to check tire pressure at days or weeks frequency. It can easily repair a punctured tube in normal use with tube punctures size under 6mm.