The Shulchan Aruch writes (Orach Chayim 170:5; listen to audio for precise citation), "One who enters a house shall do whatever the host tells him." Halacha requires that a guest obey all his host's instructions, even those that he might deem beneath his dignity.
The source of this ruling is the Gemara's comment in Masechet Pesahim (86), "You shall do anything the host tells you, except, 'Leave'." The only instance when a guest reserves the right to refuse the host's request is when the host instructs him to "leave." This does not refer to terminating the guest's visit; a host is certainly entitled to tell his guest to leave his home. Rather, this refers to a host's instruction to the guest to go somewhere – such as to run an errand – in an area that is not familiar to him. Since traveling about in unfamiliar territory entails a degree of danger, a guest is not required to comply with such a request.
The Shela (Rabbi Yeshaya Horowitz, Prague, 1565-1630) suggested a novel interpretation of the Gemara's remark, "You shall do anything the host tells you, except, 'Leave'," suggesting that the "host" refers to the Almighty. We are enjoined to obey all of God's instructions and commands, with the exception of the command, "Leave!" The story is told of an apostate named Elisha Ben Avuya, who once heard a heavenly voice declare, "Return, O wayward children – except for Elisha Ben Avuya!" Elisha relied on this heavenly voice as an excuse not to repent and to continue his lifestyle of sin and heresy, but in truth, he should have paid no attention to this voice. "You shall do anything the host tells you, except, 'Leave'." If the Almighty tells a Jew to "leave," that He is no longer interested in his return to the proper path, one should not listen. The gates of repentance remain open even for such an individual, and this is the one instance when one need not obey the word of our "Host."
Summary: A guest must obey all requests made of him by his host, unless some danger is involved, such as if the host asks that he run an errand for him in an unfamiliar place.