Simulate the rolling of a single die of any positive integer size. Take the result and apply either a positive or negative modifier, which can be zero. Then compare that resulting number against the specified difficulty, and say whether the roll was passed or failed.
For example.
"rollme a d twenty against a difficulty of sixteen with a plus modifier of one"
Icon made by https://www.flaticon.com/authors/gregor-cresnar
“"rollme a d six against a difficulty of 4 with a minus modifier of one"”