Before you can delete, you have to transfer or delete any servers you own, Discord won't let you delete the account while you still own a server with other members. Hand ownership over (right-click a member > Transfer Ownership) or delete the server. Then: User Settings > My Account > scroll down > Delete Account. Your messages don't vanish, they stay but show as 'Deleted User'. There's a short grace period where the account is disabled before full deletion, so you can back out if you're quick.
Your messages sticking around as Deleted User is worth knowing. If you want them gone you'd have to delete them manually first, and Discord makes that tedious on purpose.
There's also just Disable Account if you want a break without the permanence. It logs you out and hides you but keeps everything, and you can come back anytime.