(My text diagram didn't come out so good. Just imaging that the pipes are below the "fork" calls)

Fork is a multithreading thing. It is not specific to C++. Any language that supports threading will have fork and exec (c, java, c++, c#,etc..)

Fork:
original process---->fork---->original process
|
|------>second process

Exec:
original process---->exec---->original process
|
|------>Shelled process (like notepad or something

In exec, you can call it so that the original process will wait for a return from the shelled process, or not wait.

Each process can spawn as many processes as it wants.