Help me in coding

I’m using a water pump, Arduino Uno, soil moisture sensor and making an automatic irrigation system.
I don’t know how to code. So can someone help me out with this.

Means when there is water in soil the pump must stop pumping water but when there is no water in soil the pump must start watering the plants.