Legartis interview question

How Authentication work in a web app