Warren Buffett and Charlie Munger have been business partners since 1978 and have grown Berkshire Hathaway into one of the biggest companies in the world. Microsoft co-founder Bill Gates has worked with the pair for years as well; he joined Berkshire's board in 2004. Together, they've shared lots of wisdom. And they've learned from each other as well. "My whole business education started the day I met Warren, and the Berkshire team has helped keep it going at full speed," Gates said on CNBC's "Squawk Box" on Monday. He says that Buffett has taught him valuable lessons about thinking long-term and approaching situations with that mindset. Getting to learn from his friend "has been an incredible education and totally shaped how I think about things."

Warren Buffett, Charlie Munger and Bill Gates Lacy O'Toole | CNBC

Buffett gleaned a similar lesson throughout his years running Berkshire: The people you surround yourself with matter immensely. "It's very important in life to associate with people who are better than you are," he tells "Squawk Box." "You will go in the direction of the people you associate with, and you'll get ideas from them, you'll see how their behavior works, all that sort of thing." When choosing friends, Buffett says you should seek out people who you can both admire and enjoy. "With both Bill and Charlie, I've learned a lot, I've had an enormous amount of fun, but I pick up on their ideas and that's been a very good thing," he says.

You will go in the direction of the people you associate with. Warren Buffett