First, lets start by clarifying that "volume" isn't a particularly technical concept. Most generally "volume" refers to SPL or sound pressure level which is the amount of pressure being exerted by sound waves and depends on the distance from a sound source.
Rather what we are talking about here is the impact of signal level. Within an analog system, the signal level is determined by the amplitude of the voltage. If the signal gets too strong, the analog circuitry can't handle it and distortion occurs.
For digital signals on the other hand, we aren't dealing with voltages, (well not directly) but rather 1s and 0s that describe samples of audio. Simplified a bit, each sample describes the voltage of the analog signal at the time the sample was taken. The maximum amplitude the system can support is assigned the maximum number and the minimum amplitude is assigned the minimum number.
This range is what is known as the dynamic range of the digital signal. Values directly in the middle are 0, values that approach 0 are as far negative as the range can cover and values near the maximum are as far positive as the digital file can describe.
So what is "increasing the volume"? Well, really this is increasing the gain. Gain is the amount of amplification done to the signal. With an analog signal, it involves increasing the amplitude of the signal and in digital it means moving the values further out away from the mid point.
If, for example, I had an audio file that could use values from -10 to 10, 0 would be the midpoint. If I doubled the signal level, values of 0 would stay the same, values of 3 would become 6, -3 would become -6, etc. But what happens when we hit a number like 7? Well, 7 doubled would be 14, but we only have the ability to represent up to 10.
Unless we also increased the bit depth of the audio file, we have no way to expand the preserve the signal and can only store a value of 10. This is what is known as clipping (because the value got to high and we had to clip the value to the maximum (or minimum) we could represent.
Clipping results in the production of square waves that don't sound natural and have lost information. It generally makes crackling and popping sounds because a speaker can't actually produce a square wave effectively.
It is worth noting however that this only occurs if you actually go beyond what the file can support. If, for example, the original file only ever went to -5 and 5, there would be no clipping and no loss of data from that.
That said, there is another issue we haven't talked about yet. Noise floor. In any system, there is a certain amount of noise. Noise is junk data that gets picked up and doesn't have any meaning. It is just random and not part of the signal. For good audio, you want a high signal to noise ratio (signal is loud, noise is quiet).
However, most system's have a noise floor below which signal can't be distinguished from noise. So let's say that the system that recorded our file in our previous example had a noise floor of 1. This means any signal quieter than -1 to 1 would not be distinguishable from background noise. When we apply our gain, we also increase the signal level of this noise, so now anything quieter than -2 to 2 is noise and the noise will be just as amplified as the sound we want is.
It does also offer some benefits down stream though. Say, for example, that are DAC (digital to analog converter) has a noise floor of 3. If we didn't apply any gain, we'd lose a lot of signal quality at the DAC because we'd only have the difference between 3 and 5 for meaningful signal since our signal was only going up to 5 at the loudest. If we applied a gain before hand however, our noise floor in the DAC would still be 3, but our maximum signal would be 10, giving us a much cleaner analog signal in the end.
So the short answer to your question is, digitally increasing signal level will result in clipping and square wave production if it causes the dynamic range of the file to be exceeded and will also result in a boosting of the noise floor of the signal. That said, it also helps avoid the noise floor of any devices down stream from the gain. In general, the rule is that you want the strongest digital signal you can have without clipping at any point, thus giving you the most space between the noise floor and the signal.