Measuring frequency of 3-wire 12V fan on Arduino Uno
The pulseIn measures the duration of a high pulse on the pin.  The reference page explains it as well as I ever could.  If there is a specific thing you don't understand from it, please ask.  However, I don't think it will achieve what you want.

The circuitry in the fan connects the third (yellow?) wire to ground twice per revolution of the fan.  To make this into a "pulse" you need to pull the pin high.  Twice per revolution, the fan will pull it low.

What you now have is a signal which, for every revolution of the fan, goes HIGH, LOW, HIGH, LOW.  We want to measure the time from one rising edge to the next.  This is the time for half a rotation of the fan.

Here's some untested code:

// Wait for signal to go low
while (HIGH==digitalRead(pin)) { /* Do nothing */ }

// Start timing
unsigned long start_time = micros();

// Wait for signal to go high and low again
while (LOW==digitalRead(pin)) { /* Do nothing */ }
while (HIGH==digitalRead(pin)) { /* Do nothing */ }

// Stop timing
unsigned long end_time = micros();

// How long did that take?
unsigned long duration  = end_time - start_time;


That code can be improved in various ways but I hope it will let you understand what's going on.

That tells us how LONG half a cycle takes.  You can easily find how long a whole cycle would take -- double it.  If you want the frequency in revolutions-per-minute, you need to work out how many whole cycles you can get in a minute, which is the same as the number of half-cycles in half a minute:

unsigned long rpm = 30000000L / duration;