The difference between these two is that horizontal integration occurs when one company merges with a competitor while vertical integration occurs when a company merges with another company (or companies) up or down its supply chain.
In horizontal integration, two companies that essentially make the same product merge. An example of this would be when United Airlines merged with Continental Airlines in 2010. These two companies both provided air transportation so they were competitors. When they merged, it was a horizontal merger.
By contrast, vertical integration occurs when a company merges with another company from which it buys products or to which it sells products. An example of this would be if an auto manufacturing company merged with a glass maker and a rubber maker because glass and rubber go into making cars. The glass and rubber companies were once part of the supply chain for the automaker so this merger is vertical.
The major difference between these, then, is that horizontal integration merges companies that were in competition, thus lowering the amount of competition in the market, while vertical integration merges companies that used to buy from and sell to one another, a type of integration which has little impact on competition.