Password change mechanism

How can I implement password change mechanism?