We had a rat keep coming in over a couple of weeks. Crashed into my foot before scampering under the fridge on one occasion.
Bought a rat trap and put some lovely food inside, but it was far too clever to be caught by it. Ultimately, just had to make sure there was no accessable food, and then it stopped.
Mice on the other hand... very stupid creatures. They will happily get caught by the same trap over and over. I started recognising them, which prompted me to release them further away (my original ~100m was clearly not enough: even the club-footed one made it back!)