Arduino Pins are nothing but connections end-points through which the Arduino Board can communicate with the external devices, take inputs and deliver outputs.
There are different categories of PINs which are available in the Arduino board. With different variants of the Arduino Board, the number of PINs also differ.
Below are the categories into which the PINs of Arduino UNO can be categorized. These are:
Arduino Pins can be used simply like we plug in laptop charger into our laptop. That means one has to know which Pins are for what. Then one can use the Pins.
It should be noted that no Pins in the Arduino is dedicated to uploading programs into it. Programs can be only uploaded through the USB port which is integrated into your board. Don't worry about that.
GND is a reference usually. When we connect our positive terminal into the (+) into 5 V Pin suppose, then the (-) terminal has to be connected to GND and vice versa. But due to the presence of diodes, the GND will provide minus (-) by default.
Simple, just connect the input such as sensor input into any of the Analog Pin you want to use.
Example : Suppose, we have a LM35 Sensor, which is a temperature Sensor. It has three pins- IN-OUT-GND. So, what we will do is, we shall connect:
IN-pin into our Arduino Power Pin. (5v as 3.3v will be less for LM-35)
OUT-pin into our Arduino Analog Input (A0 to A5, Anyone we want to use)
GND into our Arduino Power PIN. (GND).
A digital Pin (from Pin 1 to Pin 13) can accept or output values either 0v or 5v.
See, we don't have Analog output Pin. That is why, there is a concept of Pulse Width Modulation(PWM) in the Arduino, using which we can convert some Pins which are Digital Pins by default, to behave like Analog. And so, we can get Analog output.
See above which are the PWM Pins in Arduino Uno.
We can use this Pin to directly feed external voltage into the Arduino. This is used when we want an analog input in the range of 0 to 3.3 volts or else. That time, we may feed the desired voltage into the AREF pin.