When more than one wave is traveling in a medium the waves simply add:
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.