Depends. If it's a good friend I'll kick them off in the middle of the room and help myself to a beer from their fridge lol.
Otherwise the polite thing to do is to wear your shoes unless the host asks you to take them off before you come in.
It also depends on the type of shoe. If I'm wearing boots then yeah of course I'll take them off. But if I just have my Sperrys or Vans on or something then I wont.