The response of a system to an arbitrary input is calculated from the system impulse response using a convolution integral. Details are discussed here.
References