(written from a Production point of view)
Viacom was a major media conglomerate that owned Paramount Pictures and, as such, owned the rights to the first ten Star Trek films. They also have ownership to Paramount Pictures' home entertainment operations, which for Star Trek presently encompass the ten films in full, but only in part for the other franchise elements, including the television productions, produced in the Paramount-era.
Viacom was founded in 2006 following a split between CBS and the former Viacom the previous year. The former Viacom, which previously owned all rights to the Star Trek franchise, was re-established as CBS Corporation, which is now the sole owner of the entire franchise, excepting the first ten films. Viacom's television division (Paramount Television), which includes the Star Trek television franchise, fell under the ownership of CBS and was renamed CBS Paramount Television, now known as CBS Studios. Paramount has produced Star Trek, Star Trek Into Darkness, and Star Trek Beyond under a separately negotiated license from CBS, but only co-share the rights to them, contrary to the first ten ones. The new Viacom also retains ownership of the Paramount Network (formerly Spike), MTV, and Nickelodeon.
Viacom, in partnership with News Corporation and MGM, launched Epix, a new pay movie channel, in fall 2007. Star Trek was run on that channel, as the ten-year exclusive deal between Paramount Pictures and CBS' Showtime expired at the end of 2007. 
The current Viacom and CBS Corporation were both controlled by National Amusements.