Use the Voluntary Exit command to signal your intentions to permanently stop your duties as a validator.
Timeline: Voluntary exiting takes a minimum of 2048 epochs (or ~9days). There is a queue to exit and a delay before your validator is finally exited.
Consequences: Once a validator is in exited state, it's non-reversible. You would need to re-key, or generate new validator keys to start staking again.
ETH Deposit: In order to re-claim your 32ETH validator deposit and perform a full withdrawal, you must have previously set a Withdrawal Address. If not yet set, see here:
Responsibilities: After your validator leaves the exit queue and is truly exited, it is safe to turn off your execution client, consensus client and validator.