The Current Visitors Web Part is intended to display a list of users that are currently visiting a SharePoint site collection.
All you need to do is just to place the Web Part on your SharePoint page (Web Part or Master).
The Web Part is using OOB SharePoint auditing so please note when you activate the Current Visitors Web Part feature on your site collection, this in turn enables the site collection audit logging.
By default the ‘currently visiting’ user is a person who viewed any content in the site collection in the last five minutes. This period can be configured in the Web Part’s properties.