There are two ways of viewing an internship.
From the company's point of view it's partly cheap (if minimally skilled) labor and partly an extended interview/promotional process, trying to find good candidates and encourage the best to stay after the internship is over (which is why it isn't just cheap labor; you want them appropriately challenged and engaged so they want to continue).
From the intern's point of view it's also an extended interview, an extended exposure to what it's really like to work in this field, and an exposure to workplace culture and expectations (if they didn't have that previously).
So for both the intern's sake and the company's, if there is really an attendance problem without legitimate reasons, management
should make sure the intern understands that this could reflect badly on whether they get an offer, and could adversely affect their career if it continues after being hired. If it was seriously bad, even interns can be fired.
HOWEVER:
As others have said, make sure your expectations are appropriate. The fact that someone is having legitimate health issues during a relatively short time should not be considered a failure.
The recent epidemic has taught us that people probably should be more proactive about staying home if they think they might be infectious rather than risking disease transmission to others; "toughing it out" is not necessarily the best thing for the company. Again, that should not be considered a failure.
If you pay hourly, and pay low, and the employee isn't engaged with/excited by the work and doesn't absolutely need the money and doesn't think they are likely to come back, you are not likely to see a great deal of effort to work every possible hour. In that case the question is whether the failure is the intern's, or the company's. The internship program may need work, either in candidate selection or in how it uses interns.
So: start by understanding if there is really an issue rather than unreasonable expectations. If there is an issue, discuss it with the intern to understand what the issue is rather than making assumptions about it. After that discussion, manager and intern should have something like a reasonable understanding of what, if anything, should be done about it. Repeat that discussion if necessary. If you can't reach agreement, don't hire at the end of the internship. If they really aren't justifying even intern hourly wages, manager should give them a warning and then fire if necessary.
If you are the manager: Manage.
If you aren't the manager: let the manager manage.