How does a message en-route to friends?

When you send a message to your friends, do you actually send the message to the server and the server will broadcast to friends? Is it possible to send a message directly to friends without enrouting to a server?

It is possible if your client supports XEP-0174 Serverless Messaging. Not sure how many clients actually support this though.

Does Smack API support Serverless Messaging? Or do you know any other implementation?

No and no.