“Hit it off” is only used to describe what can happen the first time you meet someone — namely, you meet someone and you immediately find that you get along with them really well. Example: “I introduced Joe to Sam last night, and they immediately hit it off.” “Get along well,” in contrast, can be used even for people who have known each other a long time. “Click” is often used like “hit it off” to describe immediately getting along well, but it can also be used the other way. The image underlying “click” is a piece of machinery in which one part snaps (with a clicking sound) quickly and perfectly into a tight fit with another part. Applied to friendship, it means that two friends are perfectly suited to each other by personality.