As a general rule, one should take their shoes off unless asked by the host to keep them on. Remove your shoes at an appropriate spot and set them in an orderly fashion. Do not forget that the manner in which you put shoes on and take them off, is important. Take off the left shoes first then the right, and then when [preparing to leave] put on the right shoe first then the left.
Imam Muslim (رحمة الله عليه) and other scholars narrated that the Prophet (صلى الله عليه وسلم) said:
"When you put on your shoes, start with the right shoe. When taking off the shoes, start with the left one. The right shoe is the first to be put on and the last to be taken off."
Before entering your house, or that of your bretheren look at your shoes. If they are dirty, remove the dirt or brush the shoes against the ground. Islam is the religion of cleanliness and courtesy.