What is the meaning of [If the mountain won’t come to Muhammad, Muhammad must go to the mountain.]

If things don’t turn the way you want them to, then adjust your way to suit those things.

Example: I need that book for completing my assignment. If you aren’t coming to the college tomorrow, I’ll come to your place to take it – if the mountain won’t come to Muhammad, Muhammad must go to the mountain.