Q:

What does 'exec' do?

I recently meant to run the command pkexec, but accidentally managed to run the command exec by itself with no options or arguments. I looked in the man pages for the description of exec, but I still have no idea what it means:
DESCRIPTION
       The  exec() family of functions replaces the current process image with
       a new process image.  The functions described in this manual  page  are
       front-ends  for execve(2).  (See the manual page for execve(2) for fur‐
       ther details about the replacement of the current process image.)

And actually the description goes on... But the rest of the description didn't help me very much either... So this is really my question, what does the exec command do? And did I do anything by just executing it by itself with no options or arguments, just as exec? Does it have any relation to the pkexec command?

A:

"exec() family of functions" ... are, well, functions. They are used in source code. They are not commands to be executed by users1. They are typically used by programs which need to execute another (for example, the shell itself, sudo, pkexec, etc.). A program which calls exec directly will find itself replaced by the exec'd program, so typical usage is usually fork and exec.
A contrived example would look like:
$ cat foo.c 
#include <unistd.h>
int main()
{
    const char * path = "/bin/echo";
    char * args[] = {"echo", "Hello", "World!", NULL};
    execv(path, args);
}
$ gcc -o foo foo.c
$ ./foo           
Hello World!

You can see real-life instances of exec usage using strace on various programs, including strace itself:
$ strace -e execve ./foo
execve("./foo", ["./foo"], [/* 52 vars */]) = 0
execve("/bin/echo", ["echo", "Hello", "World!"], [/* 52 vars */]) = 0
Hello World!
+++ exited with 0 +++

Note how strace itself uses exec to call the program, and then the program in turn calls exec.

1 ... except for the exec shell builtin, which is a shell feature.
exec the shell builtin is like the exec functions in that invoking exec with a program name causes the shell to be replaced by it. However, common usage of exec is usually for modifying or adding file descriptors.
Another contrived example:
$ exec 3</dev/urandom
$ read -u 3 -n 10
$ echo "$REPLY" | base64 
oZN5Qsn3nAs+1GFUCg==

You might think that we could read in from /dev/urandom directly. Yes, we could. However, this is useful when:

we need to read from/write to multiple file descriptors
we need to replace one or more of the standard file descriptors (for example, send stdout to a file for the whole shell session).

