Your computer can, of course, catch a virus if you download an executable program from an untrustworthy site and then, of your own free will, double-click on it in your file manager (or Mac desktop, or...). This is the same risk you run when downloading programs from bulletin board systems or via anonymous FTP.
Before installing an Active X control or Netscape Plug-In, understand that you should evaluate it the same way you would evaluate a new Windows application. It is just as potentially dangerous (or useful!). Java applets, on the other hand, differ because they run in a "sealed" box that limits what any Java applet can do. From time to time, bugs are found in this mechanism as well, but when they are corrected, the resulting safety applies to all applets.
Viewing images, filling out forms and so on is harmless. So, most likely, is downloading a program from a respectable source with a reputation to protect.