How the relationship between input and output is derived in a comparator?
The frequency domain transfer function is just a fairly simplified model. It makes a critical assumption that there is a single dominant pole (any other poles are much higher in frequency) and no zeroes, which makes this a first-order model—it can usefully predict real-life behaviour as long as that assumption is true, which it might be for certain circuits. It also specifies \$A_v(0)\$ is the gain of the comparator at DC, which is another key parameter of the comparator.

The time domain equation corresponds to a unit step function \$V_{in} u(t)\$ (Laplace: \$\frac{V_{in}}s\$) applied differentially to the inputs of the comparator. You can obtain the time domain equation by one of: a) multiplying the transfer function by the Laplace transform of the unit step, then taking the inverse Laplace transform; b) taking the inverse Laplace transform of the transfer function (to get the impulse response), then convolving that with the time-domain unit step input. (a is easier.)