Hi Carriann:
Students get off task for many reasons, among the reasons are personal situations, class distractions, failure to do assigned work, inability to understand, even disinterest.
Better instructors will first try to identify what assistance the student needs and then determine to what degree they are able to help. Some situations are beyond the ability of the instructor to help. But if it's an academic matter, we have to at least try to inspire, encourage, and lead towards learning the material.
Regards, Barry