You can do that in your phone's security settings.

If this function is not available, you can instead form and call the following code: (*)*04*[old PIN]*[new PIN]*[new PIN]#. Insert this code and press "Call".

(*) for some devices only one * is required before the code.