What happens when more than one wave is traveling in a medium? The waves simply add, following the principle of superposition:
The net displacement of any point in the medium is the sum of the displacements at that point due to each wave individually.
The actual string is shown at the bottom in purple. The two waves that are combined on the string are shown separately above, one in red and one in blue. What the actual string does is the superposition of the top two pictures.