Use the Hierarchical Select module:
Hierarchical Select has the ability to save the entire lineage of a
selection or only the "deepest" selection. You can configure it to
force the user to make a selection as deep as possible in the tree, or
allow the user to select an item anywhere in the tree. Levels can be
labeled, you can configure limit the number of items that can be
selected, configure a title for the dropbox, choose a site-wide
animation delay, and so on. You can even create new items and levels
through Hierarchical Select!
Another way is selecting Autocomplete term widget (tagging) as field widget, when creating your term reference field
As another option, there is the Simple hierarchical select module.