When encountering offensive comments online, it is essential to report them to the website's moderators. By clicking on the report button and selecting the appropriate reason such as foul language, slander, or incitement of hatred against a community, moderators can take necessary action. This helps in maintaining a respectful online environment. After reporting, a message confirming the action is usually displayed.