Simply learn yourself.
For iphone-solution

How to reset forgotten voicemail PIN

One of the great features of iPhone is availability of voicemail, which allows users to store messages in case they are not available or phone is switched off.  There can be a situation where you forget your voicemail PIN or Password and want to access voicemail to see messages left by people when you were offline.  Here are few steps that will guide you to reset forgotten voicemail PIN in your iPhone.

Step 1: Contacting your wireless carrier for assistance is the best option in case you don't remember your voicemail password or need to change it.

Step 2: If your service provider offers Visual Voicemail, you can change your voicemail password directly from your iPhone. Navigate to your iPhone home screen tap on ‘Settings’ icon, scroll the list press ‘Phone’ option and Tap on ‘Change Voicemail password’.

Step 3: Now, enter the password of your choice. The password can be of 7 numeric digit. Re-enter the password for authentication. Tap done and exit from the voicemail section.