Master in any field is the person who is supposed to have an extraordinary knowledge or experience in that field. Such a master can guide or help others seeking that field for knowledge or for usage.
Master term is also used in the field of Yoga or Spirituality with the meaning aligned with the above statements. Also, at times the Yoga Master or Spiritual Master is supposed to have some mystical powers. Such a master can help others having some problems, whether physical or mental.
But, one has to understand that a Master is the one who has no doubts about the field of his mastery. He is not confused about what he/she teaches or prescribes. Thus, a master remains fearless and worry free.
Yoga is meant for total removal of sorrow or for total happiness. In Hindi a person who is totally worry free is called “mast”. Thus, a real Yoga Master or Spiritual Master is the one who is superior as “mast”, that is he/she is master!