I made an IR Proximity sensor but when I connect it to the battery the buzzer starts even if I have not brought anything close to the photodiode and IR LEDs. Why is it happening? I checked my connections but there should be something wrong.
There can be several issues. As the comments said you can try to shut all IR sources like environmental sources down. Another point is the potentiometer. As you wrote you did check the wiring and also the pinning. I would expect the potentiometer to be there to change the voltage on the - input of the opamp. Try to find the point where the voltage at the negative and positive input of the opamp is equal.
As I see in the circut the potentiometer is a voltage divider. When you turn the wheel you will be able to measure different voltages at the - input. I guess that the diode will be conductiv a little or that the potentiometer position (wiper position) has to be changed. So my advice is to turn (slowly) the potentiometer and se if you can find the point. Or if you have a multimeter measure + voltage ( between + of opamp and ground) and try to select the wiper position that - voltage (between - of opamp and ground) is equal + voltage.