From the Super Mario Wiki
In the overworld, K-9s tend to walk slowly, either in random paths or slowly following Mario and his party. In the second area of Bandit's Way, two K-9s wander the grounds underneath the flying Board path. If Mario and his party defeat one, another one replaces it. A K-9 in the third area guards a Treasure Box, while four K-9s in the fourth area of the level chase Mario. As the K-9s of the second area, another K-9 respawns.
Mario can acquire an invincibility Star in the fourth area, which causes all the K-9s to move faster, including the pursuing ones.
K-9s fight in groups of two or three and are often accompanied into battle by Spikeys or Frogogs. In battle, a K-9 attacks by biting. Additionally, they have a couple of special attacks. K-9s can use the Howl attack to give the fear status condition, weakening Mario and his party's attack and defense. K-9s can also use the Fangs attack that gives 50% more damage than usual.
Names in other languages