If your friends are wise and not complete idiots, you will learn good things from them, and they will probably learn some good things from you. But, if your friends are idiots, always getting into trouble, then you will be getting into trouble, too, most of the time. It's called being an accessory after the fact, even if you don't do anything but are with them. You are known by the people you hang out with!
Ya know how people say that whoever you hang out with is who you become? Like when you notice you're all of a sudden doing something your friend does and they're doing something you do. So if you be-friend the wise, you'll gain wisdom, however if you hang around with fools, you could become foolish too.