Q:

How does RIP (Routing Information Protocol) work?

Here is a network scenario:
 network scenario:
All the mentioned routers have RIP Ver 2 running and below is their routing table.
Router1:
    C    1.0.0.0/8 is directly connected, FastEthernet0/0
    R    2.0.0.0/8 [120/1] via 10.0.0.2, 00:00:26, Serial2/0
    R    3.0.0.0/8 [120/2] via 10.0.0.2, 00:00:26, Serial2/0
         10.0.0.0/30 is subnetted, 2 subnets
    C    10.0.0.0 is directly connected, Serial2/0
    R    10.0.0.4 [120/1] via 10.0.0.2, 00:00:26, Serial2/0

Router2:
    R    1.0.0.0/8 [120/1] via 10.0.0.1, 00:00:11, Serial2/0
    C    2.0.0.0/8 is directly connected, FastEthernet0/0
    R    3.0.0.0/8 [120/1] via 10.0.0.6, 00:00:15, Serial3/0
         10.0.0.0/30 is subnetted, 2 subnets
    C    10.0.0.0 is directly connected, Serial2/0
    C    10.0.0.4 is directly connected, Serial3/0

Router3:
    R    1.0.0.0/8 [120/2] via 10.0.0.5, 00:00:26, Serial2/0
    R    2.0.0.0/8 [120/1] via 10.0.0.5, 00:00:26, Serial2/0
    C    3.0.0.0/8 is directly connected, FastEthernet0/0
         10.0.0.0/30 is subnetted, 2 subnets
    R    10.0.0.0 [120/1] via 10.0.0.5, 00:00:26, Serial2/0
    C    10.0.0.4 is directly connected, Serial2/0

Router4:
    R    1.0.0.0/8 [120/2] via 2.0.0.1, 00:00:26, FastEthernet0/0
    C    2.0.0.0/8 is directly connected, FastEthernet0/0
    R    3.0.0.0/8 [120/2] via 2.0.0.1, 00:00:26, FastEthernet0/0
    R    10.0.0.0/8 [120/1] via 2.0.0.1, 00:00:26, FastEthernet0/0

Having looked at Router4's routing table, we see that it doesn't have the 10.0.0.4/30 network listed in its routing table but it's able to successfully reach 10.0.0.4/30 or anything beyond that network. 
Why is the 10.0.0.4/30 network not listed, whereas 10.0.0.0/30 is listed? I understand that 10.0.0.4/30 is available via 2.0.0.1 and can reach 10.0.0.4/30 and beyond.

A:

Why is the 10.0.0.4/30 network not listed, whereas 10.0.0.0/30 is
  listed?

It is actually the 10.0.0.0/8 network which is listed in the routing table. The 10.0.0.4/30 network is a subnet of the 10.0.0.0/8 network, so anything going to the 10.0.0.4/30 network will match the routing table entry for the 10.0.0.0/8 network.
It looks like the error you made is not using the no auto-summary command for the router rip. This is a common rookie mistake. You used version 2 in order to get away from the version 1 classful routing, but you didn't tell it to do that.

