Read more about Humility from the works of the Mother and Sri Aurobindo.
What is Humility?
It is towards the Divine that one must be humble, an absolute and integral humility. 
True humility consists in knowing that the Supreme Consciousness, the Supreme Will alone exists and that the I is not. 
Do not think yourself big or small, very important or very unimportant; for we are nothing in ourselves. We must only live to become what the Divine wills of us. 
[True] Humility is that state of consciousness in which, whatever the realisation, you know the infinite is still in front of you. The rare quality of selfless admiration about which I have spoken to you is but another aspect of true humility; for it is sheer arrogance that refuses to admire and is complacent about its own petty achievements, forgetting the infinite which is always ahead of it. 
It's very simple: when you say to people, "Be humble," they immediately think of "being humble towards others," and that humility is bad. True humility is humility towards the Divine. 
But that [pride of the ego] is the case with all human beings. All the action is shot through with ego, acts, feelings, thoughts, everything, big or small, good or bad. Even humility and what is called altruism is with most people only a form of ego. It does not depend on having something to be proud of. 
There are people who have what may be called a warped and excessive modesty or humility and who tell themselves, "Surely the Divine has thrown me out, I am good for nothing, He can do nothing with me, the only thing for me is to give up the game, for He finds me unworthy of Him!" 
Why is Humility Important?
The First Necessity
Of course one can [do Yoga without being great]—there is no need of being great. On the contrary humility is the first necessity, for one who has ego and pride cannot realise the Highest. 
It is to have a certain inner humility which makes one aware of the helplessness without the Grace, that truly, without it one is incomplete and powerless. 
You must be very attentive, you must be very silent, must observe yourself very clearly. And you must be very humble; that is, be willing not to play a great part in all this story. The misfortune is that usually either the vital being or the mental being or even the physical being is very anxious to play a part, very anxious. So it swells up, takes up a lot of place, covers the rest; and it covers it so well that one can't even become aware of the presence of the divine Force because the personal movement of the physical, the body, the vital, the mind, covers everything with its own importance. 
[T]he conditions in which one can grow through all experiences with security and have the right development of the complete realisation without disturbance to the system or being carried away by the intensity of the experiences. Calm, psychic purity, bhakti and spiritual humility before the Divine are the three conditions. 
Foundation for Realization
Humility, a perfect humility, is the condition for all realization. The mind is so cocksure. It thinks it knows everything, understands everything. And if ever it acts through idealism to serve a cause that appears noble to it, it becomes even more arrogant more intransigent, and it is almost impossible to make it see that there might be something still higher beyond its noble conceptions and its great altruistic or other ideals. Humility is the only remedy. 
A true and sincere humility is our safeguard―it is the surest way to the indispensable dissolution of the ego. 
[Humility is] the surest shield against all hostile attack. Indeed, in the human being it is always the door of pride at which the Adversary knocks, for it is this door which opens to let him enter. 
No ambition, no vanity, no pride. A sincere self-giving, a sincere humility, and one is sheltered from all danger...this is what I call being greater than one's experience. 
How to Cultivate Humility?
Keep the Soul’s flame of Transformation Burning
When there is somebody who is in contact with the Divine Truth and can express it, then the opinions given out are no mere compliments or criticisms but what the Divine thinks of you, the value it sets on your qualities, its unerring stamp on your efforts. It must be your desire to hold nothing in esteem except the word of the Truth; and in order thus to raise your standard you must keep Agni, the soul's flame of transformation, burning in you. 
By Becoming an Instrument
Learn thou first to be the instrument of God and to accept thy Master. The instrument is this outward thing thou callest thyself; it is a mould of mind, a driving-force of power, a machinery of form, a thing full of springs and cogs and clamps and devices. Call not this the Worker or the Master; it can never be the Worker or the Master. Accept thyself humbly, yet proudly, devotedly, submissively and joyfully as a divine instrument. 
Change of Consciousness
Humility before the Divine is also a sine qua non of the spiritual life, and spiritual pride, arrogance, or vanity and self-assurance press always downward. But confidence in the Divine and a faith in one's spiritual destiny (i.e. since my heart and soul seek for the Divine, I cannot fail one day to reach Him) are much needed in view of the difficulties of the Path.
One must work the whole of one's life and never forget to work in order to uproot this weed that springs up again and again and again so insidiously that you believe it is gone and you feel very modest and say: "It is not I who have done it, I feel it is the Divine, I am nothing if He is not there", and then the next minute, you are so satisfied with yourself simply for having thought that! 
What is the right and the wrong way of being humble?
It is very simple, when people are told "be humble", they think immediately of "being humble before other men" and that humility is wrong. True humility is humility before the Divine, that is, a precise, exact, living sense that one is nothing, one can do nothing, understand nothing without the Divine, that even if one is exceptionally intelligent and capable, this is nothing in comparison with the divine Consciousness, and this sense one must always keep, because then one always has the true attitude of receptivity—a humble receptivity that does not put personal pretensions in opposition to the Divine. 
A spiritual humility within is very necessary, but I do not think an outward humility is very advisable (absence of pride or arrogance or vanity is indispensable of course in one's outer dealings with others)—it often creates pride, becomes formal or becomes ineffective after a time. I have seen people doing it to cure their pride, but I have not found it producing a lasting result. 
Read more about Humilty from the works of the Mother and Sri Aurobindo.