You will need to teach yourself server-side programming. Any language could handle it, including Java, ASP, PHP, CGI.
Theres lots of resources on the net. So just choose a language and do a google search. Make sure you search for a language tutorail and not a tutorial on writing a chat room.
Its important you understand how a language works before your start writing code.