When you use \newcommand, you can give the number of "arguments" to that command. These arguments are "things" that you give to that command.
For example, a command without arguments is the one you showed:
\newcommand{\dd}{{\rm d}}
a command with one argument can be defined as:
% ↓ number of arguments
\newcommand{\dd}[1]{{\rmfamily #1}}
% ↑↑ The first argument
so when you use it, the #1 is replaced by the first argument. So when you type this:
\dd{hello}
is the \dd is replaced by:
{\rmfamily hello}
The same goes for a command with more arguments. For example:
% ↓ number of arguments
\newcommand{\dd}[2]{{#1 #2}}
% ↑↑ The second argument
% ↑↑ The first argument
so you could use, for example:
\dd{\rmfamily}{hello}
which would be replaced by
{\rmfamily hello}
Optional arguments
You can define an optional argument by specifying the default value for it:
% ↓ number of arguments
% ↓-------↓ Default value for the first argument
\newcommand{\dd}[2][\rmfamily]{{#1 #2}}
% ↑↑ The second argument
% ↑↑ The first argument
so when you type
\dd{hello}
or
\dd[\rmfamily]{hello}
the substitution is the same:
{\rmfamily hello}
but if you type
\dd[\bfseries]{hello}
you would get hello!
P.S.: Don't use \rm, it's deprecated. Use \rmfamily instead.
\newcommand{\myrm}[1]{{\rmfamily #1}}? If not, please clarify what you want to achieve. – Phelype Oleinik May 24 '18 at 19:59\dd,\ee,\ffetc.? Or just a way to a have a single command which will apply to anything you give it (which is @PhelypeOleinik 's solution.) (Also, possibly unrelated to your actual problem, but you shouldn't use two-letter font macros in LaTeX. See Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX?.) – Alan Munn May 24 '18 at 20:16\textrm{d}, or\textrm(Fred}, or\textrm{Julie}or ... – Jan 21 '20 at 13:08