To save money, I'm sometimes tempted to replace just one string which is getting worn out. But it's better to replace a full set of strings. Mixing old and new strings can make a violin sound out of tune. Here's why.
After replacing a string, the main pitch of the strings may be tuned to exactly a fifth apart. But the overtones of the strings are likely to be out of tune. And these out-of-tune overtones will make people perceive the fifth to be out of tune.
Why are the overtones likely to be out of tune? As strings age, the windings can wear away, the string can be flattened where the fingers press against it, it can stretch, and it can collect rosin and skin oils (both on the surface and embedded in the string). This makes the string non-uniform along its length, which produces "inharmonicity"--the harmonics move away from being exact multiples of the fundamental tone. For the technical details, do a Google search on the words "string stiffness inharmonicity".
The out-of-tune overtones really do matter. In fact, at least one study has shown that "pitch judgment is usually dominated by some partials other than the fundamental." See "The effect of inharmonicity on pitch in string instrument sounds" at http://www.acoustics.hut.fi/~hjarvela/publications/icmc00_text.pdf.