Using light curves from the HATNet survey for transiting extrasolar planets we investigate the optical broad-band photometric variability of a sample of 27,560 field K and M dwarfs selected by color and proper-motion. A total of 2120 stars exhibit potential variability, including 95 stars with eclipses and 60 stars with flares. Based on a visual inspection of these light curves and an automated blending classification, we select 1568 stars, including 78 eclipsing binaries, as secure variable star detections that are not obvious blends. We estimate that a further ~26% of these stars may be blends with fainter variables, though most of these blends are likely to be among the hotter stars in our sample. We find that only 38 of the 1568 stars, including 5 of the eclipsing binaries, have previously been identified as variables or are blended with previously identified variables. One of the newly identified eclipsing binaries is 1RXS J154727.5+450803, a known P = 3.55 day, late M-dwarf SB2 system, for which we derive preliminary estimates for the component masses and radii of M_1 = M_2 = 0.258 +- 0.008 M_Sun and R_1 = R_2 = 0.289 +- 0.007 R_Sun. The radii of the component stars are larger than theoretical expectations if the system is older than ~200 Myr. The majority of the variables are heavily spotted BY Dra-type stars for which we determine rotation periods. Using this sample, we investigate the relations between period, color, age, and activity measures, including optical flaring, for K and M dwarfs., finding that many of the well-established relations for F, G and K dwarfs continue into the M dwarf regime (Abridged).