Usually don't get affected.
I learned recently that tuberculosis started as a soil bacteria. Its ability to resist and take over predatory amoebae turned out to carry over to our macrophages. Oops!
As for real alien biology, I would give higher odds to the equivalent of bacteria and protists (seek out food in the environment and break it down) crossing over than to viruses (hijacking reproductive machinery).
But if there's some reason to converge on the same DNA and amino acids, or if panspermia seeded the same cellular biology everywhere, that would increase viral odds.