"Hit it off" means to get along really well. "They hit it off the second they met."
There's an analogy here, but no-one seems to admit it! :) I'm thinking of a successful play, eg. hitting a baseball really well, starting a sports game... (I might be on the wrong track here)