Butterflies, like many other insects, understand that I am getting near from behind. How do they feel this - through vision, hearing, or some other sense?
Butterflies can see behind them.
Merry et al. (2006) have estimated the field of view of the butterfly, by investigating the Orange Sulphur butterfly (Colias eurytheme):
Colias eurytheme. Source: Massachusetts Butterfly Club
The authors found that this butterfly has a very large visual field, encompassing
93% of the spherical space around the animal. There was a small blind spot behind the head not seen by either eye. Another study by the same group showed similar results in another species of butterfly, the Empress Leilia (Asterocampa leilia). Here is a picture of the estimated binocular field of view of the Orange Sulphur, revealing that the animals' vision is virtually spherical, with only a small blind spot at the back (the white area):
Source: Merry et al., 2006. Grey is the field of view, white the blind spot posteriorly. Cardinal directions are indicated (Dorsal, Ventral, Posterior, Left and Right).
Here are a few pictures of other species of butterfly that show the protruding compound eyes covering a large field of view:
The feature of large visual fields in insects is, however, not restricted to butterflies (Lutowski & Warrant, 2002). Another insect I often try sneak upon to take pictures are dragon flies, and more often than not they fly away regardless of the angle I approach them. They too have these large compound eyes with a field of view extending to the back:
Source: Nature North
Butterflies have nearly 360 degree field of vision (see e.g. Belth. Butterflies of Indiana), so they can see you or other predators approaching from behind at the same time as they examine the flower they are feeding from. A large field of vision is common in many animals that are preyed upon, and for instance many birds (e.g. waders) have 360 vision, some even with overlapping, binocular vision behind their heads.