Using the t() function in Drupal 6
All you have to do is to Enable your proper language (using locale module) and then use translate interface (site building -> translate interface) , and you can translate your string.

after that whenever t('hello world') is called , drupal checks for proper language , then checks if there is a translation for 'hello world' in that language , if true , then it will print translated string.