The three muscles in this location are usually innervated by the median nerve, and they all control movement of the thumb.
Abductor pollicis brevis abducts the thumb. This means that it the hand was laid flat so the palm faced upwards, this muscle would would point the thumb upwards. This muscle is the most proximal of the thenar group.
Flexor pollicis brevis, which lies next to the abductor, will flex the thumb, curling in up in the palm.
The third thenar muscle, opponens pollicis lies deep to abductor pollicis brevis. As its name suggests it opposes the thumb, bring it against the fingers. This is a very important movement, as most of our dexterity comes from this action.
The innervation of these muscles by the median nerve is unusual, as most of the intrinsic muscles on the palm of the hand are supplied by the ulnar nerve. The lateral two lumbrical muscles are the other exception.
Another muscle that controls movement of the thumb is adductor pollicis. It lies deeper and more distal to flexor pollicis brevis. Despite its name, its main action is mainly rotation and opposition. It is not in the thenar group of muscles however, so is supplied by the ulnar nerve.