When you are signed in to Skype, the Skype logo is displayed in either the taskbar on Windows and Linux or the dock on Mac.
If you close the Skype window, the Skype logo may still appear.
To remove Skype from the taskbar, dock or system tray, right-click or control-click the Skype logo in the system tray and select Quit Skype. This will completely close the application, which means you will no longer receive instant messages or calls through Skype.
You can change your settings so that when you close the application window by selecting X, Skype will either keep running or completely close.
To do this:
Sign in to Skype.
Select your profile picture.
Turn the On close, keep Skype running toggle on or off.
Also, To Secure your macOS from virus and trojans, use always a mac optimization software like Mac Optimizer.