If you want to get voicemail on iPhone, there are two things you need to do. One of them is to make sure you have an active cellular data network connection because voicemail doesn’t work with Wi-Fi. The second thing you need to do is set up your voicemail.
To set up your voicemail, just tap Phone and then Voicemail. The on screen prompts will lead you through the process. You can then access your voicemail just by dialing your phone number. If you have any issues, contact your carrier to verify that voicemail on your iPhone has been configured properly.
Source Apple Support