Scope probe having ringing with 10x option
As @user2233709 said, first adjust your probe's compensation. If the compensation is not set properly, you won't see a sensible trace on the oscilloscope.

Second, a 50MHz scope won't do a good job of showing a 25MHz square wave; it doesn't have enough bandwidth. If you look at the Fourier series of a 25MHz square wave, it has all the odd multiples of 25MHz: 75MHz, 125MHz, etc. A 50MHz scope will roll off those high frequency signals, and the result will look closer to a sine wave.

Third, since the signal with the 1X probe looks pretty much like a sine wave, it suggests that your circuit is getting loaded down by that probe. That's why you switch to a 10X probe, but even then, it may be too big a load, and just looking at the signal may be distorting it.