How to add a custom field to the frontend registration form?

How do built-in Magento modules add a custom block to the frontend customer registration form?