How can you associate a program with a webpage. Lets say if i wanted my program to upgrade automatically, how would i do that?

Thanks in advance!!!