When you open system preferences > click on Apple ID > again click on password and security section , click on change password , it promise to enter admin password , once entered again a pop up window appears to enter new Apple ID password and verify it .
See the article Change Password & Security settings for your Apple ID on Mac - Apple Support
There is no option to simultaneously sign out apple id from Mac system preferences while you are changing Apple ID password , to sign out Apple ID from Mac system preferences , click on overview section , click on sign out Change Overview preferences for your Apple ID on Mac - Apple Support