The Latin word odium is usually translated as 'hatred', but there is no exact English word corresponding to what Aquinas means when he talks about the vice of odium (2-2.34). It could be called 'hatred', but it is not a matter simply of disliking someone. Odium is disposition arising from both envy and wrath, so understanding what it is requires taking into account the essential features of each. And envy and wrath are both terrible vices, because they both, in different ways, treat good as evil; so you know from that alone that their progeny will be a terrible thing.
Since both wrath and envy treat the good of another as bad, there has to be some notion under which they can do so -- it is not possible to treat something one recognizes as good, simply speaking, as if it were evil. The notion under which wrath (ira) views the good of another is as a provocation due to its inconvenience for oneself. Excessive anger, on its own, is a vice, but it is not the vice of wrath; wrath is a tendency to attack the good in others, or the good of others, as if the good itself were a provocation, because their good is difficult for you in some way. Our proper attitude when someone has something good, or does something good, or receives something good, should be gladness at the good. But sometimes another person's good is not easy for us to be glad about; perhaps it takes away the possibility of getting what we were hoping to get, or introduces new problems for us. When we fail to handle this kind of situation properly, we are in danger of developing the vice of wrath: it is drive for vindication not against evil but against good.
Envy (invidia) is even more insidious. It is the vice in which the good of another is seen as a bad thing because it is not yours. In almost authors who discuss it, it is almost universally considered among the worse possible vices one can have. Its actions are spiteful and destructive, and generally the destruction is mutual: envious people will even harm themselves if it would prevent someone else from getting good or enjoying it.
Both wrath and envy are capital vices (the acts of these vices we often call the seven deadly sins). Capital vices are not necessarily the worse sins, although envy and wrath are quite serious on their own. Gluttony, for instance, is a relatively minor vice just considered in itself. But what makes a vice a capital vice, a chief vice, is that it is rarely on its own. Vices that are not corrected breed other vices, and capital vices are vices that are in just the right places in our personalities to breed lots of other vices. Thus wrath and envy, although quite serious on their own, are capital vices because the actions they motivate lead to the development of many other vices. The vice of odium or hatred grows naturally out of both, but especially from envy, whose connection to hatred Aquinas is getting from things Gregory the Great says in the Moralia. Wrath disposes us to odium, but it can never directly spill over into it, because wrath is limited by its very nature: it is a drive for vindication, and thus by its nature has to limit itself to the notion of 'righting a wrong', where the wrong is, in this case, a good. Odium does not limit itself; it gets this from envy, of which it is the ultimate daughter vice. Envy tends toward the spiteful, the malicious, the petty, the destructive; odium is what you get when these things actually develop in full.
Odium is thus a terrible vice. It is not a capital vice, however, because it does not particularly tend to breed vices. The reason for this, however, emphasizes how terrible it is: odium doesn't breed other vices because it is an end-of-the-line vice, a vice you get when the monstrous vice of envy has already become especially monstrous.
It is important in all of this to remember that vices and sins are not the same. Sins are actions; vices are stable dispositions of character, when sins become second nature. The vice of odium is not particularly easy to develop; but you can engage in the sins of hatred associated with odium even without having the vice -- indulging such sins is one way to get the vice associated with them.
Every vice opposes some virtue in some way, because vices are corruptions of things of which virtues are excellences. The virtue odium opposes, according to Aquinas, is charity. Now, charity is an immensely powerful virtue capable of many different acts (of which the primary are love, joy, peace, and mercy). Odium is the vice opposed to charity insofar as it is exercised in its most proper act, namely, love, and therefore has the same structure as the love that proceeds from charity. Charity is expressed most directly in love of God and love neighbor, so odium is expressed in odium Dei and odium proximi -- as they are usually translated, hatred of God and hatred of neighbor.
Odium Dei is a somewhat tricky idea. God is Goodness Itself, and considered precisely as such cannot be hated. But God can be hated under certain ideas in which God can be presented as bad. Aquinas gives two examples: God as prohibitor of sins and God as inflicter of penalties (peccatorum prohibitor et poenarum inflictor). This is not a mere matter of disliking a prohibition or punishment; it carries over to the source of the prohibition and punishment. Odium Dei is the worst sin. All sins can be treated as being aversions to God as Goodness Itself; but odium Dei is the most pure form of this kind of aversion.
Odium proximi is likewise not just any kind of dislike of someone. It is very far from disliking someone because of their faults. It involves instead hatred of their nature and grace (natura et gratia), both of which are good in themselves. As Aquinas notes, goods that our neighbor has received from God cannot really and truly conflict with our own good, so we should love the good of another. Sins against other human beings can be judged either in terms of the disorder involved in the sinner or in terms of the harm against others involved in the act. Seen in this light, there are sins much worse than odium proximi in terms of harm caused -- murder, for instance -- because, while odium might result in external action, its action never has to be more than internal, and internal sins harm others least. However, the disorder involved in odium is so great that no other sin against our neighbor can be as bad -- no matter how harmful an action is, it can derive from odium. With regard to sins of neighbor, Aquinas says, odium proximi est ultimum in progressu peccati: hatred of neighbor is the furthest point in the development of sin.