Hi all, I am very new to electronics. In the diagram shown here, where should I connect the pin of R4 variable resistor.
Actually you can see this component like two singles resistors mounted in dividing bridge.
Admitting you want to divide a 10V supply, the resulting voltage of the divider is in the middle of the potentiometer and the ground (in this case).
Just connect the wiper terminal to any of the other 2 terminals and you'll be fine. This way, a part of the total resistance gets shorted and current only flow through the rest of it (thus becoming your variable resistor).
However, be careful: when applying a voltage to a potentiometer connected like this, you may easily exceed its current rating if you reduce to much its resistance value. You may want to add a fixed current limiting resistor in series to avoid this.