To be rapt is to be carried away, caught up, or otherwise engrossed in something. If a performer is really good or particularly mesmerizing, the audience will be totally rapt.
Rapt developed from the Latin raptus, meaning to “seize, carry off." So imagine something so interesting that it seizes your attention and carries you off to another world. In fact, rapt is related to the word rapture, which is an experience of extreme, other-worldly happiness. So do your teacher a favor and give her your rapt attention during math class.