(written from a Production point of view)
Viacom, formed in 1971, was a major media conglomerate that owned such properties as Paramount Pictures (and, as such, the Star Trek movie franchise), CBS, UPN, Spike TV, Blockbuster Video, MTV, Nickelodeon, Infinity Broadcasting, and Paramount Parks, among many others. They also owned all rights to the library of Paramount Television, which includes all Star Trek television programs. Pocket Books and Simon & Schuster, publishers of the Trek novels, were incorporated into Viacom in 2002.
Viacom acquired the Star Trek franchise in 1994 when it purchased Paramount Communications. (Paramount Pictures acquired the franchise in 1967 when both it and Desilu Productions were purchased by Gulf+Western, which combined them under the Paramount Pictures name. Gulf+Western later changed its name to Paramount Communications.) Sometime prior to the 1994 purchase, Viacom had already been acquired by "media mogul" Sumner Redstone, who subordinated his acquisition under the family held conglomerate National Amusements. During the takeover of Paramount Communications, Sumner was engaged in a bidding war with former Paramount Pictures executive Barry Diller, who had been the studio's chief overseer for the first three Star Trek films, before he moved on to become a Hollywood mogul himself.
Following Viacom's split with CBS in 2005, Viacom dissolved and was re-established as the CBS Corporation. CBS acquired the rights to Paramount Television, which was subsequently merged into CBS Paramount Network Television, and to UPN, which subsequently merged with The WB to become The CW. CBS Corporation also continues to own Simon & Schuster and Paramount Parks.
Following the split, a new Viacom was founded. This company received the rights to Paramount's film division, which includes the Trek movies. The split notwithstanding, both newly formed companies remain controlled by Redstone's National Amusements conglomerate.