Plants are different to animals in that they do not have a central nervous sytem. They have no mind and are not aware of their surroundings.
Venus Flytraps are able to detect then prey has landed or crawled into thier traps because of a set of sensing hairs. These hairs are found on the inner surface of each lobe within the trap. There are roughly 3 – 5 hairs on each side.
When one of these trigger hairs are tapped in twice in a short period of time the ion concentrations in the leaves increases. This creates a weak electrical charge that transverses across the leaf. This charge tells cells in certain parts of the the leaf to rapidly alter their size. This creates tension on certain parts of the leaf to create a trapping motion.