I would like to know about the usage of the word "company"(friends). For example "Tom doesn't keep the company of good people (means he has befriended bad guys) or "people say you should keep the company of good people".
Not keeping the company of good people does not mean befriending bad guys. It's a bit more like failing to befriend good people.
It's about choosing who you "hang out with", about making connections that can be useful in the future.
People sometimes say that it isn't what you know, but who you know, that will help you reach your goals in life.
At least in American English, "keep the company of" sounds strange. Normally we say "keep company with", as in the following:
(with someone) 1.Lit. to spend much time with someone; to associate with or consort with someone.
Bill has been keeping company with Ann for three months. Bob has been keeping company with a tough-looking bunch of boys.