If interest rates increase and a person can get a higher interest by depositing money in an interest bearing option without any risk, the required return on investments made in riskier assets increases. This increase in the required rate of returns compensates for the risk that is being taken.
The investment being made is that of buying stock of a company for which the future cash flows remain constant. The future value of the stock is the sum of the discounted cash flows. As the rate of interest has increased, the future cash flows have a higher rate of discount which makes them smaller. The sum of this discounted cash flow is a smaller quantity. If the required rate of return has to be higher, the initial cost at which the stock is acquired would have to be much lower.
This is the reason why the cost at which investors are willing to buy stock decreases when the rate of interest increase.