Nanomechanical sensors typically operate by detecting changes in their mechanical resonance. These changes can be induced by various factors such as mass loading, temperature changes, or chemical interactions. The sensors often consist of nanowires, nanotubes, or nano-cantilevers that can oscillate at specific frequencies. When a target molecule or particle interacts with the sensor, it causes a measurable shift in the resonance frequency.