Your privacy settings determine who can leave you a voice message. If you’ve set your privacy so that only people who you know can call you, then the same applies to any incoming voice messages. If your settings allow anyone to call you, then anyone can leave you a voice message.
To change your privacy settings, select Skype > Privacy from the menu bar (Skype > Preferences on a Mac). Under Allow calls from, choose anyone or contacts only.
Learn more about managing your privacy settings.