How do I create a text field in registration that only shows up if a checkbox is checked?
Conditional Fields seems to be what you are looking for.


  Conditional Fields for Drupal 7 is an user interface to the new States API, plus the ability to modify fields appearance and behavior on certain conditions when viewing content.


Especially their example use case seems to match exactly your checkbox - text field need:


  When editing a node (or any other entity type that supports fields, like users and categories), the dependent fields are dynamically modified with the States API.
  You can, for example, define a custom “Article teaser" field that is shown only if a "Has teaser" checkbox is checked.


Emphasis mine.