Formal:
* Acquaintance (someone you know casually)
* Associate (someone you work with or have something in common with)
* Companion (someone you spend time with)
* Comrade (someone you share a common cause or belief with)
Informal:
* Buddy
* Mate
* Chum
* Sidekick
* Best friend
* Close friend
* Confidant
* Soulmate
Slang:
* Bro
* Dude
* Homie
* Bestie
The best word to use will depend on the specific situation and your relationship with the person.