You can install this code by placing your cursor after it and typing
C-x C-e. The name of the function will appear in your echo area.
Then, you can use this code by typing C-u and a number and then
typing M-x multiply-by-seven and pressing RET. The phrase
‘The result is …’ followed by the product will appear in the
echo area.

Speaking more generally, you invoke a function like this in either of two
ways:

By typing a prefix argument that contains the number to be passed, and
then typing M-x and the name of the function, as with
C-u 3 M-x forward-sentence; or,

By typing whatever key or keychord the function is bound to, as with
C-u 3 M-e.

Both the examples just mentioned work identically to move point forward
three sentences. (Since multiply-by-seven is not bound to a key,
it could not be used as an example of key binding.)

A prefix argument is passed to an interactive function by typing the
META key followed by a number, for example, M-3 M-e, or by
typing C-u and then a number, for example, C-u 3 M-e (if you
type C-u without a number, it defaults to 4).