One thing you can do, especially if you know this is a problem with a particular session, is arrange the lesson accordingly, so that there's something for everyone to be getting on with as soon as they arrive that doesn't require a lengthy explanation from you. You can pick up with a sharper start once they are all in and occupied.
If a pupil comes in once the lesson is underway, you must indicate that you have noticed this and you must deal with it at some point during the session.
It may not be convenient or sensible to enter into an immediate investigation, which could be time-consuming, disruptive and non-productive, especially if it is clear to you that all is not well with that particular pupil.
At some point it's critical that you demand an explanation: not to do so is to send a sign that being late to your lesson doesn't matter - and that could have dire consequences for the way in which pupils see you and the importance of complying with your standards.
All of this presupposes that you get to lessons on time as well - and sometimes this can be just as difficult for you. Wherever possible, it's better to be at the door as pupils arrive, rather than turning up to find an incident has occurred in your absence that will take time and energy to investigate later on.
Jon Berry is a senior lecturer at the school of education, Hertfordshire University.