To win you must get three of your counters in a row.
If the applet does not display please download the latest version of the Java Virtual Machine which is available here.