A virtual keyboard is a software component that allows users to enter characters by clicking on the keys displayed on a screen. This method mitigates the risk of keystroke logging because the input is not captured by physical keyboard hardware. The clicks on the virtual keyboard are registered by the browser or operating system directly, bypassing the physical keyboard's input stream.