Obeying a husband is obligatory for a wife.
الرجال قوامون على النساء ... فالصالحات قانتات ... فإن أطعنكم فلا تبغوا عليهن سبيلا
Men are in charge of women ... So righteous women are devoutly obedient ... But if they obey you [once more], seek no means against them.
— Quran 4:34
لو كنت آمرا أحدا أن يسجد لأحد لأمرت النساء أن يسجدن لأزواجهن لما جعل الله لهم عليهن من الحق
If I were to command anyone to make prostration before another I would command women to prostrate themselves before their husbands, because of the special right over them given to husbands by Allah.
والذي نفس محمد بيده لا تؤدي المرأة حق ربها حتى تؤدي حق زوجها ولو سألها نفسها وهي على قتب لم تمنعه
No woman can fulfill her duty towards Allah until she fulfills her duty towards her husband. If he asks her (for intimacy) even if she is on her camel saddle, she should not refuse.
— Abu Dawud, Ibn Majah
The limits of this obedience are as follows:
It is agreed upon that she must not obey her if he commands her to do something haram:
لا طاعة في معصية الله
There is no obedience in matters involving disobedience to Allah.
— Abu Dawud
It is agreed upon that she must obey her if he commands her to do something which is obligatory on her, from the rights of Allah and the rights of the people - including the rights of the husband himself:
وأمر أهلك بالصلاة
And enjoin prayer upon your family
— Quran 20:132
يا أيها الذين آمنوا قوا أنفسكم وأهليكم نارا وقودها الناس والحجارة
O you who have believed, protect yourselves and your families from a Fire whose fuel is people and stones
— Quran 66:6
كلكم راع فمسئول عن رعيته ... والرجل راع على أهل بيته وهو مسئول عنهم
Everyone of you is a guardian and is responsible for his charges ... a man is a guardian of his family and is responsible for them
— Bukhari
It is agreed upon that she must obey him at least when he calls her to have sexual intimacy.
إذا دعا الرجل امرأته إلى فراشه فأبت أن تجيء لعنتها الملائكة حتى تصبح
If a man Invites his wife to sleep with him and she refuses to come to him, then the angels send their curses on her till morning.
— Bukhari
It is agreed upon that she must obey him in matters related to the above. Such as on obeying the husband when he commands her to not go out of their house, or to not let someone visit her in their house, or to do ghusl from menses and janabah, or to make herself attractive to him such as by trimming nails, tidying hair, shaving pubic\armpit hair, or when he commands her to adorn herself, or to be respectful to him in her tone and manners, or to refrain from optional fasting and other non-obligatory acts which might hinder the husband from having intimacy with her, or to refrain from eating or using something with a foul smell which repulses him such as onion or garlic etc.
لا يحل للمرأة أن تصوم وزوجها شاهد إلا بإذنه، ولا تأذن في بيته إلا بإذنه
It is not lawful for a woman to fast (optional fasts) without the permission of her husband when he is at home; and she should not allow anyone to enter his house except with his permission
— Bukhari
مسائل الإجماع والاتفاق في باب ... وعلى أنه يجب على الزوجة طاعة زوجها وملازمة المسكن، وعلى أن له منعها من الخروج
The matters of consensus and agreement in this topic are ...
It is obligatory on the wife to obey her husband and to remain in her house, and it is the right of the husband to forbid her from going out
— Mizan al-Kubra
There is disagreement on whether it is also obligatory to obey him in everything else (as long as it is not haram, nor violates her own rights). Some scholars have stated that it applies categorically because of the unconditional wording of the Quranic verse and Ahadith which command obedience:
وحقه عليها أن تطيعه في كل مباح يأمرها به
His right over her is obedience to every permissible thing which he commands her to do
— Durr al-Mukhtaar
While others consider it limited:
المرأة لا يجب عليها طاعة الزوج في كل ما يأمر به، إنما ذلك فيما يرجع إلى النكاح وتوابعه
A woman is not obligated to obey her husband in everything he commands, rather it is regarding Nikah and its related matters
— Al-Bahr ar-Raiq