An applet can communicate with a server (servlet or otherwise, doesn't matter) using the java.net.URLConnection class. You may also want to look into the Apache Commons HttpClient package, which provides more features for HTTP communication.
It would also be possible to use raw TCP/IP sockets using the java.net.Socket class (and a corresponding ServerSocket on the server). Come to think of it, that would be a better fit than using HTTP.
These days it would be more natural to do this in HTML and JavaScript using AJAX technologies, though. That's what the
XMLHttpRequest JavaScript object does (which is supported by all major browsers).