What happened at Sekigahara was that Ieyasu forced his defeated enemies to acknowledge him as their lord. As Tokugawa vassals, they could expect grants of land in fief in which they ruled. They in turn taxed the peasants who lived on the land and gave some of the rice to samurai families as stipends. Larger samurai families might then give part of their stipend to their own vassal samurai. End result is a pyramid of loyalties extending from the ruler down to the common foot soldier. Sound familiar? The system is very similar to European style feudalism. (A big difference is the stipends - in Europe vassals were given land instead.) By making everyone subordinate to him, Ieyasu completed the pacification of the daimyo which Oda and Hideyoshi had started. In 1603 the Emperor gave Ieyasu the title of shogun and thus the right to rule in the name of the Emperor. Now Ieyasu could legitimately make laws for the whole country.
And make laws he did. First he moved the government to Edo (modern day Tokyo), at that time a really small town. Although the Emperor stayed in Kyoto, the real power was with the shogun and his Bakufu (tent-government). Like Hideyoshi before him, Ieyasu outlawed all social mobility. He used the Confucian system of four classes - inserting warriors in place of scholars. The classes (from highest) were warriors, peasants, artisans, and at bottom the greedy, good-for-nothing merchants. Warriors rule and peasants and artisans make things but merchants make nothing but profit from other peoples labor (hence the ``greedy, good-for-nothing'' part). Of course, there was limited downward mobility. If a samurai really wanted to, he could renounce his status and become a commoner. Often this was done by artists who could support themselves without their stipends. Ieyasu did Hideyoshi one better though; he made it legal for any samurai to kill any commoner who was rude to the samurai. A bit extreme but not his most important legacy.
As shogun, Tokugawa Ieyasu controlled Japans international relations, coinage, and relations between the various han. His primary concern in the early years of his shogunate was the preservation of his familys rule. Thus, although the daimyo ruled their individual fiefs independent of the Bakufu, their behavior in matters national was under Ieyasus control and the shogun had a very wide view of what constituted national matters. For obvious reasons, castle building was a very efficient method of pissing the shogun off. Building or even repairing castles required government permission. In addition, the daimyo were required to assist with public works projects such as dams, roads, bridges and the like. This was partially for pragmatic reasons (you need good roads to move troops quickly) and partially as a drain on the daimyosEtreasuries (since they had to pay for the work). Also, marriages between daimyo families required the Shoguns okay, lest a couple of daimyo try to seal a pact with the exchange of daughters. So, what happened to the mentally deficient daimyo who decides not to obey the shogun? For serious offenses, Ieyasu could dispossess a lord of his lands, effectively destroying that family forever. Another popular punishment was seppuku - also known as hara-kiri. The offending lord had to ritually slit (kiri) his belly (hara) open in order to make amends. This was considered to totally restore the mans honor and was also occasionally used to show sincerity or to show ones loyalty by following ones lord in death. A less drastic punishment was to move a daimyo to a smaller han. Punishments and rewards also depended on what kind of daimyo was involved.
A lord is not a lord is not a lord. In English that means that lords were divided into three groups, depending on their relationship with the Tokugawa family. The inner group was composed of branches of the Tokugawa family and were known as shimpan daimyo. Next was the daimyo who were vassals of the Tokugawa before the battle of Sekigahara. These were called fudai daimyo (hereditary lords). The final group was the tozama (outside) lords - daimyo who did not submit until after Sekigahara. Shockingly, the tozama daimyo were believed to be of unreliable loyalty and thus given fiefs far from Tokugawa lands and usually separated from each other by more reliable fudai daimyo. However, some tozama - such as the Shimazu in Satsuma han (present day Kagoshima-ken) - were strong enough that the Tokugawa left them alone as long as they didnt cause any problems.