Yogic traditions offer us the Ashtanga system or the Eight limbs of Yoga which themselves are split into three groups, Physical, Mental and Spiritual.
PHYSICAL 1. Yama 2. Niyama
MENTAL 3. Asana 4. Pranayama 5. Pratyahara
SPIRITUAL 6. Dharana 7. Dhyana 8. Samadhi
One could think of it expressed as the physical being our body and all external material things, the mental being everything that we think and internalize, and spiritual being our soul essence. The revered BKS Iyengar refers to Yoga as "A science which liberates ones mind from the bondage of the body and leads it towards the soul. When the mind reaches and merges with the soul, the soul is freed and remains thereafter in peace and beatitude".
The behaviour and attitude that we have towards ourselves and others is called Yama and the way we relate to ourselves inwardly is called Niyama.