There are several dynamic DNS services you can use...
the most known is
http://www.dyndns.org
The principle of dynamic DNS is that you register a DNS account (such as mycomputer.dyndns.org, or mycomputer.homeunix.net, or mycomputer.mine.nu since all these domains are owned by dyndns.org), and then each time your DSL or cable connection goes up (that is, each time you change IP), you run a little program to update the dynamic DNS with your new IP. You can do that automatically, with a script or whatever, there are tools available which do that (updating your DNS).
What do you mean by "it didn't work" ?