The area between the scrotum and anus is called perineum and pain in this area can be due to many causes. It can be due to perineal trauma like during cycling, urethral trauma, urtehritis, prostate infections, gonorrhea, perianal abscess, anal fissure or fistula, bladder infections or any obstruction in the urethra. A detailed examination by a urologist along with a comprehensive profile of investigations is needed.
I sincerely hope that helps. Take care and regards.