Yes, you can get HPV by having vaginal, anal, or oral sex with someone who has the virus. HPV can be passed even when an infected person has no signs or symptoms. You also can develop symptoms years after you have sex with someone who is infected. This makes it hard to know when you first became infected.
In men, genital warts can infect the urethra, penis, scrotum, and rectal area. The warts can appear as soft, raised masses with a surface that can be smooth (on the penile shaft) or rough with many fingerlike projections (anal warts). Others may appear pearly, cauliflower-like, or rough with a slightly dark surface.