A "square" wave is a theoretical object, like infinite. When you're switching a transistor, it just generates a series of waves that... "mostly" add up in phase. If the signal travels in some medium other than good conductors, it will be less pretty, and "interferences" can happen. It won't look square then. (And yes, you can just filter a square wave in various ways to convince yourself it's effectively composed of a series of sine waves.)
If you're considering "edges", even any pure sine wave has rising and falling "edges". The rise and fall times will just depend on frequency.
The typical "rise time" of a sine wave of frequency F is ~ 0.295 / F (note that it's a bit less than the usual ~ 0.35 / BW, for the max rise time for a given bandwidth, due to the fact bandwidths are defined at -3dB ...)
(To calculate this, just take a sine wave S(t) = A.sin(2.pi.F.t), take the 10% and 90% points of the P-P amplitude, and infer the time difference from there.)