Its an anti-fungal medicine that works by interfering with the fungi and yeast cell membranes causing holes to appear. This allows their insides to leak out and therefore cell cannot survive, killing the infection.
Lamisil cream is an over the counter anti-fungal cream. This was prescription only until 8+ years ago. It can be toxic to your liver. It should be used sparingly.