It is a misunderstanding to talk of an unified Japan during the Tokugawa period with respect to having its own army, etc. These notions only become relevant after the concept of the "nation of Japan" was created in the 1860's and 1870's.
In effect, every han or domain was its separate state though they paid homage to the Tokugawa overlords. These han can be divided into closely linked (shinpan and fudai) with the Tokugawa (e.g., Aizu and Tsuruga) and outsiders (e.g., Satsuma). In effect, this means that we are dealing with the militaries of scores of different 'states' as the internal politics of each han was left to the individual ruler, with the shogun responsible for foreign affairs, commerce, and national security but the daimyō administered their lands independently.1
However, in most cases, Tokugawa policies prevented the daimyō from aspiring too far. One of the most notable aspects of this was the alternate year system or sankin-kotai—a major drain on the domainal economies. In fact, it was only after sankin-kotai was discontinued in 1862 when many domains started to modernize their armies and buy foreign ships (though several had done so already previously). Other significant policies were the ikkoku ichijyō rei and buke shohatto which both laid down obligations to the han and also prevented them from building castles without shogunal approval.
Meanwhile, waging war was made more difficult by centralizing the action to the new government and restricting the possession of arms. Warrior monks had been defeated in combat and peasants had been demilitarized by Oda Nobunaga and Toyotomi Hideyoshi, but Tokugawa Ieyasu expanded this to allow samurai to give up their status and become peasants while others gave up their land for a yearly retainership.
Therefore, there was no official shogunal plan for maintaining military education or training troops for war excepting some very small, bodyguard-like, units that were in constant readiness.
The shogun did have a special group of samurai, the hatamoto, who were his direct retainers. These had served as guards during the preceding sengoku jidai, but in the Tokugawa period they essentially became the Shogunate's army with every hatamoto expected to serve militarily when called upon (though many primarily filled administrative roles).
...by 1635, the earliest date for which reliable figures are available, their number stood at about 5,000 men. Because of their obligation to supply troops for the shogun in addition to their own personal service, a call to arms of the hatamoto would have resulted in an army of about 80,000 men. This figure included those who occupied the third tier of the hierarchy, below the hatamoto, who were called yoriki or gokenin; these commanded the 'line infantry' squads of dash in or ashigaru footsoldiers within the Tokugawa army.
However, as inter-han warfare had ceased, the hatamoto gradually lost military significance while turning more and more into policemen. Many hatamoto also served as martial arts instructors.
There were also a limited number of horse guards' units. The most formidable of these were the Great Guard of twelve companies (after 1632) of 55 men each. The Goshoinban were similarly organized with a more specific role of guarding Edo Castle. In addition, after 1643 the Goshinban of eight companies (by 1724) of 60 men each was created for further security in Edo Castle but also protecting the shogun.
As all samurai, incl. the above-mentioned hatamoto, were expected to be able to be called to arms if the need arose, it also bears to consider their education. This is a difficult subject to find good overviews on, and my own reading focuses on the mid-19th century so this might be different in the early period.
Overall, in the mid-19th century, the focus was on administrative subjects, incl. writing, calligraphy, classical Chinese (both poetry and literary classics), and a uniquely Japanese subject called national studies. At the same time, however, most young people would have been expected to study swordsmanship, both as an avenue into philosophy and to improve their martial skill. Spear schools also existed, with some of the leading Meiji reformers having studied that (though I'm not sure if that was instead of the sword or alongside it).
I believe that horsemanship was in decline, at least amongst the lower samurai ranks, though the nobility probably learned this skill—if anyone can support this either way, that would be appreciated. Cavalry did not form a significant part of the Bakumatsu-era armies, however.
The philosophy that the samurai studied is represented both by Nitobe Inazō's 'Bushido' as well as historical writings and events which represented the ideal warrior's code, such as 'Hagakure' the forty-seven rōnin. These were very idealized, and in some cases went against official shogunate policy such as with the 47 rōnin incident.
Wikipedia did include this unsourced claim as well:
Some samurai and even commoners also attended private academies, which often specialized in particular Japanese subjects or in Western medicine, modern military science, gunnery, or Rangaku (Dutch studies), as European studies were called.
Regrettably, the statement isn't dated to a specific period. It is my understanding that gunnery was extremely uncommon after the early-17th demilitarization. Similarly, "modern military science" isn't qualified in any way; it was my understanding that for most students of "Western studies", this was limited to the Dutch language, philosophy, and medicine, but I'm not sure. These subjects sound a lot more plausible after 1853 and modernization spurring from that.
Notable Military Events
Notable military events during the time period you quote of 1603–1868 include the Siege of Osaka and the Shimabara Rebellion in the early period. Four other rebellions are listed on Wikipedia for the time period, but one of them is linked to ronin, two to the Ainu, and only one could be considered a more popular uprising, channelling the feelings of Osaka.
An example of an independent han action (i.e., without shogunal troops but with the shogun's permission) is the 1609 invasion of Ryūkyū where Satsuma deployed its troops, in numbers they felt sufficient, to subjugate Ryūkyū (and successfully accomplished it).
After Perry's expedition in 1853, militarization proceeded quite fast, especially amongst the outside domains like Satsuma, Tosa, and Chōshū. However, the pro-Shogunate domains also modernized relatively fast—the primary success measure was not which side these domains supported but rather how actionary (vs reactionary) a government the han had. So, the outside domains had more to gamble. That said, many people even in those governments were anti-Western in their outlook, even if they liked their guns and artillery.
There's also the famous Shimonoseki incident where Chōshū tried to block off the Shimonoseki straits to foreign shipping. Allied foreign troops landed and conquered the artillery positions. As the original shelling of foreign ships was an unsanctioned move by Chōshū, the Shogun authorized a punitive expedition against the domain.
Creating the Imperial Army
The end of independent han armies in Japan came when the three main pro-Imperial domains of Satsuma, Tosa, and Chōshū 'donated' their armed troops to the Emperor. This created a nascent 'Imperial Army' which remained a very sectarian organization for several decades. This was primarily evident by the 'victorious' domains exerting undue influence in the Army and Navy, e.g. Yamagata Aritomo for hailing from Chōshū. Similarly, most naval commanders in the early years hailed from Tosa. It should be noted that when the Bakumatsu started, this was not necessarily the goal of the samurai leaders of the opposition to the Shogunate but rather a bottom-up endeavour that the domains were finally abolished (Sakamoto Ryōma being a good example).
1. The understanding of the people serving in each han would have been that their loyalty was to their lord and domain.