Why should I connect the l289n motor driver wires to specific arduino pins only? So, I am new with arduino and am to build a robot using motors, for that I have bought l298n H bridge motor driver. I have watched various site and videos ,to make sure not to make a mistake but, in every video and sites
I have found their connecting the motor direction controller to

IN1 -&gt; Arduino Pin 8 (digital) and IN2 -&gt; Arduino Pin 7 (digital)
Till then it was fine ... Now the fishy thing for me is
IN3 -&gt; Arduino Pin 5 (PWM) and IN4 -&gt; Arduino Pin 4 (Digital)
Why connect to a Digital and a PWM?
For E1 and E2 I am sure that the wires should be connected to the PWM (~) pins for arduino, to control speed of the motor..
But, Should not I be able to connect IN3 and IN4 both to rest of the digital pins 12, 13 or 2,4 Just Like IN1 and IN2 is connected to 7 and 8.
But the IN3 and IN4 is connected to a PWM and a Digital pin.
Conclusion,
So can I use all the unused non PWM digital pins to connect the motor direction control?
Thanks for your precious time..!
Pwm is just a digital out with extra fancy on off controls.  You can use any digital out if you do not need those extra features.
To just signal a single H bridge (1 motor of your l289n) for forward, reverse, stop, one only needs two digital outs.
I recommend you get the hang of your h bridge first - signaling it on a bread board with vcc (usually 5v but can be 3.3) and ground rather than the arduino.  Then once you understand the motor directions that result from your wiring, write the code accordingly.  This tends to result in:

fewer fried arduinos
code with functions and signals named after their intent (rather than having to mix forward and reverse)