Thanks just a little confused
So I've just gone and dug out my old notes on the Edo Period, and I'll try explain this as simply as possible. If you have any extra questions, feel free to ask.
Firstly, some facts and basic info about Japan and the bakufu system.
Across all of Japan through the Tokugawa period, there were around 250 daimyo. Tokugawa Ieyasu was a daimyo himself, with his own domain, so was technically equal in status prior to becoming shogun. His successors held a domain too.
Among those ~250 daimyo, there were three catergories: Shinpan: 23 daimyo who were "descended by birth or adoption from Ieyasu", known as 'cadet families'. There were three daimyo amongst this group who could provide suitable heirs to the shogun if required. Fudai: ~150 diamyo who had fought with Ieyasu at the Battle of Sekigahara and had proven their loyalty. Known as 'allied' daimyo. Tozama: The remaining daimyo, who had become lords before Ieyasu was in charge. They were assumed to be neutral or hostile towards the Tokugawa.
Now we know the basic positions of the daimyo and Shogun, we can look at the political structure.
The shogun was the paramount authority. Ieyasu, the first shogun, retired from the office in 1605(after five years of rule), so his son could be confirmed by the Emperor to give legitimacy to his rule. Once that was done, they routed out opposition, and by 1615 with the siege of Osaka Castle they had largely destroyed that opposition. To maintain control over Japan, the shoguns spread out the shinpan and fudai daimyo, giving them territories strategically placed across the islands so that if trouble fermented, they could subdue it rapidly. In this way, the tozama were prevented making large alliances by virtue of distance between them.
So with all opposition gone, the shoguns had to assure the loyalty of the daimyo. The first two categories, shinpan and fudai were guaranteed already - they were family and men raised to the rank by the Tokugawa family themselves. The shoguns spread out these daimyo, giving them territories strategically placed across the islands so that if trouble fermented, they could subdue it rapidly. In this way, the tozama were prevented making large alliances by virtue of distance between them. To further solve this, the shoguns demanded that every daimyo "would swear a pledge of fealty to the House of Tokugawa". In return, the daimyo were given legal documents that assured their right to rule in the lands he held. This meant that the daimyo were in effect autonomous, but only if they swore allegiance to the shogun, and only if they maintained that allegiance.
There were other benefits to swearing allegiance. Daimyo had security - no neighbours would attack because it would disturb the peace and risk the wrath of the shogun. In the event of natural disasters, the shogun provided aid to the affected domains. And lastly, by maintaining allegiance, the shogun was encouraged to maintain the order, assuring the daimyo of their position.
In the event of allegiances being broken, the shogunate had given itself the right to alter land holdings as they saw fit. This meant they could give daimyo a different territory to rule over, reduce the holdings, or even confiscate land entirely, leaving a daimyo with no holding. This was standard for the first five shoguns:
"[They] were especially intrusive, depriving 213 daimyo of all or a portion of their holdings for some offense real or imagined, promoting 172 trusted followers to daimyo status, and ordering 281 transfers from one domain to another."
Moving a daimyo from the north end of Honshu to the south end for example, would place his family in charge of a new region of strangers, where rebellion against the shogun would be less easily stirred by the daimyo. By the same token, reducing the holdings of a daimyo reduced his income and thus the amount of resources he could feasibly raise.
Despite all this disruption to daimyo activities by the shogun, the daimyo still retained their autonomy by and large. The daimyo paid no tax to the shogun, but levied tax within their domain as they saw fit. They set and enforced laws as they saw fit and had their own local body of samurai, directly under their command. They were required to provide military service to the shogun if it was requested. Most importantly as far as autonomy goes, they were directly responsible for the borders of their domains, and the passage of people through those borders. So a daimyo could theoretically lock down his domain, forbidding the inhabitants to leave.
In that regard, daimyo held significant power, and the shogun was happy to leave them alone. However, if there was a perceived sleight, or trouble in the regions, or rebellion or any other matter that displeased the shogun, he was able to (a) call for military forces from every domain to aid him in suppressing it, (b) remove that daimyo's domain, or (c) transfer that daimyo somewhere where there was less historic loyalty to that family.
So to sum up, the daimyo ruled autonomous domains, where they controlled taxes, laws, borders, the military, and the civilian population's actions. But they did so at the pleasure of the shogun, who could remove all of this in an instant. If a daimyo was to resist the shogun's authority, then every other daimyo was liable to be called upon for military aid, at which point one daimyo would face the forces of up to two hundred others, which is a scary prospect.