Your question contains a lot of different questions. I will try to address some of them. People in a committed relationship begin hidden, secretive relationships or have purely sexual encounters with other people for a number of reasons. Frustration and dissatisfaction with their committed partner may be part of the reason but is usually not the main cause.
Other reasons people cheat include the desire for newness and excitement, a chance meeting with an attractive sexually or emotionally available person, or an internal, personal crisis within the person that leads them to act in a way that is not characteristic for them. There are also some people who have problems with being sexually compulsive or dishonest across many life areas and who really don’t care about how their choices affect other people. Whether your husband is likely to ever cheat again depends a lot on what the reasons were for his previous affair and whether he has learned better, more honest ways to cope.
The second problem you mentioned is that he often looks at other women, even when he is with you in public situations and this makes you feel insecure and nervous. While it is natural for both women and men to appreciate other people for their attractiveness or beauty, there is more than one way to handle those feelings.
Some women are not bothered by this behavior, but many are. Given your history with your husband, it makes sense that this behavior would “push your buttons” emotionally. If you are uncomfortable with the amount of attention he pays to other women when you are together, speak up (in a private setting, like home) and let him know clearly how you feel. If he keeps doing it after you ask him not to, his behavior is hurtful and inconsiderate. You might consider going to a marriage counselor to see if the two of you can resolve this conflict.