Y = C + I + G + (X - M)

Y: Output produced in the economy
C: Total consumption demand
I: Total investment
G: Total govt. spending
X: Total value of exports
M: Total value of imports

We assume a closed economy so the identity boils down to 

Y = C + I + G
Y = AD  # this is the equilibrium condition for the goods market.

where AD is the aggregate demand.

Using the above equilibrium condition we can arrive at the goods market equilibrium condition 
that would eventually lead us to the IS curve equation which is:

Y = alpha*A - alpha*b*i
Y = Total output 
c = marginal propensity to consume (MPC)
alpha = 1/(1-c) 
A = autonomous component (Government spending, autonomous consumption and investment)
b = Senstivity to interest rates 
i = interest rates
I = I.0 - b*i (investment function)
C = C.0 + c*y (consumption function)

Similarly for the money market equilibrium, the money supply has to equal the money demand 
leading to the following condition:

MS = k*Y - h*i
or
y = MS/k - (h/k)*i  

Here,
Usual definitions follow from above 
k = sensitivity of transactions demand for money to change in income.
h = sensitivity of speculative demand for money to change in interest rates. 
MS = real money supply in the economy ((nominal money)/(prices)