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

How to add a custom field to the frontend registration form (a ready example)