Obviously he wanted to know how to do it programmatically, otherwise he wouldn't have asked.
You can either use IO.File.AppendText or an IO.StreamWriter with "Append" set to true. Write the "IP sitename" as mnpeep did above and write each to a new line. An example:
[highlight=vb.net]
Using sWriter As New IO.StreamWriter"C:\Windows\System32\drivers\etc\ho st", True)
sWriter.WriteLine("127.0.0.1 LocalHost")
End Using
[/highlight]