Augusta National Golf Club has a committee of members who meet and determine which players are grouped together in Rounds 1 and 2, and what those groupings' tee times will be.
Those committee members exercise full authority, and have complete discretion to group players as they see fit.
Otherwise, Augusta National does not divulge any trade secrets about the process; they don't discuss it at all. But it's definitely not a random draw. The pairings and times are the result of consultation among the club's tournament committee members.
The One Traditional Pairing
There is one Masters pairing that is the same every year: The reigning U.S. Amateur champion (if he's still an amateur) plays Rounds 1 and 2 with the defending champion of The Masters. (If the reigning U.S. Amateur winner turns pro prior to The Masters, he forgoes his spot in the tournament.)
The Pairings Process Also Considers Fans, TV Networks
The pairings and tee times at The Masters also take into account the needs of television broadcasters and of fans.
For example, the two biggest stars in the field are likely to play at opposite ends of the draw.
Let's use Phil Mickelson and Tiger Woods as examples. Most likely, one will play in the morning tee times and the other will play in the afternoon. This guarantees that one of the two biggest stars, either Mickelson or Woods in this example, will be playing during television coverage.
Those are the kinds of things the Augusta competition committee will think about when making the pairings.
They also aren't immune to having a little fun in the first two rounds with "theme" groups. For example, in 2009 one of the early round groups was comprised of three young hotshots, Anthony Kim, Rory McIlroy and Ryo Ishikawa. Nothing random about that kind of grouping. It's a group that fans and the TV network will be happy with.
The committee might group three former champions together, or three winners of other majors, or three golfers of the same nationality. But most of the tee times won't have such a clear connection between the golfers within them.