Hal will pick up bits from normal conversation.
Hal can also learn from text file (clipboard)
Hal can learn from IF THEN statements (see the main page on this site)
Hal is not a "turn key" system. That is, don't expect Hal to know all things right you purchase it. Like building a good friendship...it takes time and patience. Use good dialogue with Hal and you'll be rewarded with a character that exhibits a lot of your own ideas and feelings as well as some of it's own.
Good luck!