There are 2 ways to program these boards. I'm going to assume you'd use Arduino, which is by far the simpler way for beginners.
Digital pins are used with digitalRead, digitalWrite and pinMode. Analog pins are used by analogRead.
PWM pins can be used by analogWrite, which causes the pin to pulse rapidly, where the average simulates an analog voltage. That's useful for controlling motors, lights and other stuff where the average power is what matters.
This stuff is all part of the core Arduino functionality, which is documented here:
http://arduino.cc/en/Reference/HomePage
Many pins have still more functions. UART (TX1, RX1) are serial ports, used with "Serial". I2C and SPI are other communication ports, used with the Wire and SPI libraries. Many common chips, like motion sensors and flash memory, have these types of communication.
For example, if you purchase this WiFi communication module, it connects to the SPI pins.
http://www.pjrc.com/store/adafruit_cc3000.html
Many others on the market use the SDA and SCL signals.
If you're not using hardware with that type of communication, you can use leave those pins unused. It's much like having a Firewire or Ethernet port on a regular computer, which just comes with the machine even if you never have a need to use it. But if you do have something else that needs I2C or SPI communication, then you'd use those ports.