Interesting, for what I remember of my (old) studies

Usually both processes share the same code but they run in competition with each other, with the rest of the job processed on the system in question. Normally parent and child are running different instructions.
The child process open files from parent process. These can constitute a means of interaction between the 2 processes.
Otherwise the data (program variables), the stack and the environment of the parent process are duplicated for the new process and put into an area of memory reserved to it and not visible to other processes, parent inclusive.
Normally, the parent process executes the instructions of the program to meet the call to fork() and at this point, the parent process spawns a new process.
By this time the 2 processes have independent life, and the result returned from the fork() is different for each process and it is normal that the 2 processes run different paths within the same program.