Pair programming is a practice in which two or more people get in front of a computer and collaborate on writing program. Usually, one person is "driving" by typing the actual program, while the other person offers tips or direction. Suppose that two people pair program for a while, and only one of those people ever touches the keyboard. Does the person who never touched the keyboard hold any copyright over the produced work? What happens if the person who never touched the keyboard works for a large tech company, which claims copyright over the works of all of its employees?
They both do
Specifically, this is a joint work (see Ownership of Work Copyright by Multiple Authors).
Copyright exists in the creative element of the work; not the physical embodiment although some (but by no means all) jurisdictions require the physical embodiment to exist.
If the non-"driver" had instead been dictating and the "driver" took everything down verbatim then the non-"driver" would be the sole copyright owner. However, because both contributed to the work, both own it.