A very broad question with a lot of answers. To sum it up, the Japanese did not believe that the Americans could be entirely repulsed. Their strategy basically rested on dedicating all resources towards dealing the initial invasion landings a bloody setback, with hopes that plus increased war weariness in the US would entice the US to negotiate peace instead of demanding surrender.
They (correctly) ascertained that the US would probably first try for landings on Kyushu, the southernmost of the home islands, which could then be used as a base against attacks against Honshu. Thus, the Japanese moved significant forces into the Kyushu area. These forces were divided into different classes of divisions, with several units being designated as "counterattack" units. These units wouldn't attempt to contest the landings directly at the shoreline (where they would be subject to crushing naval bombardment), but instead would attempt to attack the beachheads a few hours after the initial landings - long enough for the US to get significant forces ashore but not long enough to consolidate to the point that the Americans could deploy their superior mechanized forces. In practice this would be tough because there were very few transportation assets available to these divisions, but in retrospect we can see that attempting to bottle up a landing could work quite well in suitable terrain, such as at Anzio.
While this was going on, the invasion fleet would be subject to massive "tokko" ("special attack", i.e. kamikaze) strikes. Japan at this point had ceased to be able to contest the air over Japan except with ground fire, and that was pretty sporadic compared to German flak. In exchange, almost all Japan's remaining military aviation had been set aside for use in this role. The planes had been moved to dispersed and camouflaged airfields, where they would sit until the invasion. A lot of them were underperforming older models, or trainers, but the Japanese weren't expecting to dogfight with these things. Estimates of how many would have been available vary, but range between 5,000 and 7,000; plans for waves of 1,000 planes were in place. Both sides planned for higher-than-normal success rates since the invasion would greatly reduce problems of finding targets ("fly to the shore, hang a right, find a transport") and the vulnerable transports would be concentrated near shore in order to offload troops.
These weren't the only suicide attackers. The navy had midget submarines and frogmen who would attack the landing craft with explosive charges. Civilians were formally "drafted" into defense units, most of which had no military weapons or uniform, and which had been instructed to attack with bamboo spears or hand tools. There's no way to tell whether such units would have had any positive effect - but their inclusion would almost guarantee that US troops would fire on civilians, with the potential for mass slaughter.
US forces had detected the buildup on Kyushu and, by July and August, were already thinking about alternatives; the deteriorating transport and fuel situation in Japan meant that the assets that had been devoted to Kyushu mostly couldn't be repositioned. A significant argument in the US command structure over alternatives was pre-empted by the end of the war.
I highly recommend Richard Frank's Downfall to anyone interested in the topic - it has exhaustive details about the specifics of force allocation, Japanese and Allied plans, as well as the diplomatic aspects of the end of the war.