Great explanation Augusto!

Need to clarify one thing regarding target.

1. Network takes some random number and it generates its hash

No, the target is not exactly a random number. The target is defined in accordance with the rate of blocks being accepted by the network each 10 minutes. So there is a defined formula to generate the target.

Let's examine a real case, the first block generated by Satoshi Nakamoto when he started the Bitcoin protocol. The Internet page blockexplorer.com provide a history of the blockchain in CSV format:

http://blockexplorer.com/q/nethashblockNumber,time,target,avgTargetSinceLast,difficulty,hashesToWin,avgIntervalSinceLast,netHashPerSecond

START DATA

144,1231693144,26959535291011309493156476344723991336010898738574164086137773096960,26959535291011309493156476344723991336010898738574164086137773096960,1.00,4295032833,1563,2747941

There is a field "time" followed by a field "target". The number in the field "time", 1231693144, is given in Unix format. So let's convert this number to the traditional Gregorian calendar format:

http://www.wolframalpha.com/input/?i=1231693144+unix+timeThe first block of the Bitcoin network was accepted on Sunday, January 11, 2009, 4:59:04 pm UTC. The target to accept the block was:

26959535291011309493156476344723991336010898738574164086137773096960This is a number with only 68 decimal digits. Now let's compare with the last computed target:

68962778243821519216393853205209897734463141354237780295680It is a 59 decimal digit number. In other words, the last target is a number lower than the first target. That means that as lower the target becomes, greater is the difficulty to find a random hash which number is equal or lower than the target.

Now, to understand how the target is defined, let's examine the first block was accepted once the difficulty increase above 1:

32256,1262153464,22791060871177364286867400663010583169263383106957897897309909286912,24875298081094336890011938503867287252637140922766030991723841191936,1.18,5080592338,502,9272714

So, on Wednesday, December 30, 2009, 6:11:04 am UTC, the first block with difficulty above 1 was accepted by the network. At that time, difficulty was 1.18 and the target was:

227910608711773642868674006630105831692633831069578978973099092869122. Then it distributes this hash as new target

Correct, all clients distribute to each other the same target once it is recalculated.

3. Then miners try to find a number whose hash is equal to or less than target

Correct, the "miners" use their SHA-256 hash generators device to find the current target.