What are the 5V and VIN pins for? I believe I can supply the Arduino with power in three different ways: 


Use USB. The design trusts the 5V to be regulated, and does not regulate it in any way. 
Use a regulated power source, trusted to be 5V, and connect it to GND and 5V. 
Connect an unregulated power source, eg a battery, to GND and VIN. This should be above 6.2V (since the dropout voltage is 1.2V) and preferably between 9V and 12V. There is a built-in regulator that will supply the Arduino with exactly 5V. 


But can I use any of those pins to power other components. E.g. if the Arduino is powered with USB, can I use the 5V pin to power a diode? I thought I could, but the voltage is 4.70V, while the USB is 5.07V. The VIN is 4.26V btw. 

Are the 5V and VIN only for powering the Arduino?
No. You can draw power from the 5v and VIN pins on the arduino. VIN is the completely unaltered input power before the regulator (it will be useless if regulated 5v is supplied directly). Outputting power is what the 5v pin is intended to be used for, not as a power input.

From the arduino website:


  5V. This pin outputs a regulated 5V from the regulator on the
  board. The board can be supplied with power either from the DC power
  jack (7 - 12V), the USB connector (5V), or the VIN pin of the board
  (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
  regulator, and can damage your board. We don't advise it.