The default Skype settings allow anyone not on contact list to call or IM.
Here is how to change these privacy settings to avoid unwanted calls and messages :
Login to Skype and choose Skype > Privacy.
Here, change the options for “Allow calls from” and “Allow IMs from” to “people in my Contact list”. If needed, auto receiving of video and screen sharing too can be changed from” people in my Contact list only” to “no one”.
Other than that, clear IM history or change it’s settings from the “Allow IMs from” section .
Also, to disable targeted ads, remove the tick mark next to “Allow Microsoft targeted ads”.
Finally, hit “Save” for these changes to take place.
Happy Skype-ing.