What the test checks
A population is in Hardy–Weinberg equilibrium when the genotype frequencies at a locus are p², 2pq and q², where p and q are the two allele frequencies. Those are the frequencies you get from random mating with no selection, migration, mutation or drift acting between generations.
This calculator takes your observed counts of the two homozygotes and the heterozygotes, recovers p and q from the genotypes themselves (p = (2·AA + Aa) / 2N), shows the counts expected under equilibrium, and tests the difference. The inbreeding coefficient Fis = 1 − (observed heterozygotes / expected heterozygotes) summarises the direction: positive means a deficit of heterozygotes, negative an excess.
Chi-square and exact p
The chi-square statistic is the sum over the three genotypes of (observed − expected)² / expected, and is read on one degree of freedom because the two allele frequencies were estimated from the same counts. It is a good approximation when the expected counts are large.
When the sample is small or one allele is rare, the expected counts get small and the chi-square approximation breaks down, so the exact test is the one to report. It enumerates every possible arrangement of the same 2N gene copies that keeps the allele counts fixed, and sums the probabilities of arrangements at least as extreme as yours (the Wigginton–Cutler–Abecasis formulation, with half of the probability of your own arrangement counted, as is standard). The two p-values usually agree closely; where they differ, trust the exact one.
How to read a significant result
A departure from equilibrium is a statement about your data, not automatically about biology. In genotype calling it is the standard quality filter, because a systematic heterozygote deficit is what a failed caller produces: a duplicated region read as one site, alleles dropping out at a SNP under a primer, or samples from two populations analysed as one.
In a real population the same deficit points at inbreeding, selection against heterozygotes, or non-random mating, while an excess suggests outbreeding, balancing selection or a genotyping artefact that misreads homozygotes as heterozygotes. Check the missingness, Hardy–Weinberg counts per batch and the allele frequency before deciding which one you are looking at.