Here's a brief rundown on the series of events in the first war.
1587 - Toyotomi Hideyoshi began sending envoys to Korea, one such envoy demanded the Korean cooperate with the Japanese in a plan to attack Ming dynasty China, a rather unfathomable plan at the time to the Korean court, so the vaguely decline the "invitation"
1592
May-July: the Japanese landed around late May, within the span of 2 whole month they managed to take almost every major city from Bushan to PyongYang with only minimal resistence. as the Chosen dynasty forces were long at peace and their defensive setup was focused on the north, the Chosen court was effectively in exile, though individual general / offficials began to organize local people to fight unconventional warfare, the only real conventioal military force left operating in Korea were their navies (mostly under Yi)
August - Sept : as it became apparent that Korea had been overran, the Ming dynasty started to send help, at first they were confused by the information and send only small parties from the local level, which obviously ran into much more than they could handle. by late August and Early September, the situation became more clear and they came ot the conclusion that a full army must be send in.
At this time though, the Japanese forces began to run to trouble, as their navy were getting smacked around by the Koreans, which caused a logistical nightmare as many shipping from Kyushu ended up at the bottom of the sea, meanwhile, their extrodinary expansion also began to turn into a curse, as their forces were widly spread and mostly concentrated in individual cities (hmmm, sounds familiar), where as local milita forces (called the righteous armies) made it tough for them both to gain local supplies and the supplies that did manage to make it to shore from Japan. they did manage to make one small scouting incursion into the Chinese border.
Oct-Dec= Japanese forces come to a halt as the logistical situation become grave , they did manage to capture the crown prince of Korea , the Ming began to gather their forces and make preparation to enter Korea, they eventually set out late in December with a force of (according to the letters written by the administrator in charge for the Ming) 36,000 . composed mostly from Northern garrisons and some forces from the South (who were most experieinced in dealing with Japanese)
1593
Janury : the Ming forces set out directly for Pyong Yang, the northern most of the 3 major cities of Chosen at that time (other two is Kaesung and Seoul ) , they reached in the first week of the month, after some intial bartering they attacked on the 8th and was able to beat out the Japanese forces within the day. the retook Kaesung in the next couple of weeks.
By late January they were ready to march on Seoul, however while on their way confusing report lead the Ming general to believe that Seoul had been abandoned by the Japanese forces (which was similar to what happened at Kaesung, which was in a state of disrepair so the Japanese forces only made some attempt at resisting before a full retreat), so he decided to set out with only his elite cavalries of some 2000-3000 strong, along with their advance scouting forces, to try and secure the city quickly, however they ended up running into a large Japanese force and a confusing battle ensued (as the Japanese had no idea that it was the main generals of the Ming comming without his main body of soldiers). eventually the Ming forces arrived and both side pulled back (casualty in this battle is wildly different, though that both side didn't press the battle further probably suggested a pretty bloody draw)
Feb-March: after the setback on their inital attempt at Seoul, the Ming began to take their time and observe the situation, they realize that a very large host had gathered in the Seoul area (possibly 80k-100k), which was too much for their own army to handle in direct confrontation, so they only pressed on again after about a month's preparation, though they did not directly try to besiege Seoul, instead they manuvered in the outskirts area, eventually they found a break and located the chief grainary stash of the Japanese forces and was able to destroy it. which made the already bad supply situation of the Japanese army that much worse.
At this point, the Japanese decided to pull out of Seoul all the way back to Bushan, they had went from holding at least part of all 8 province in Korea to left with only serious control over 1 in the span of 4 months. negotiation began to start at this point, as the Japanese forces were disheartened and still faced dire supply situation, the Ming however, were beginng to run into similar issues, as they find a Korea completely ravaged, a government that had effectively dissolved, and a supply path in horrific condition, thus even with a smaller force and much higher level of local cooperation they were strained, and they realize that now the entire Japanese forces is concintrated down south, making it very risky for their smaller army to push even further.
By April, the Prince was returned as part of the deal to start negotiation, though due to various reasons (including serious misunderstanding on both side) it fell apart some 3 years later and the second war began. this time the Koreans were much more prepared, and the Ming brought a even larger (though probably not as experienced or well prepared) forces, so the Japanese made little headways on land, while they continue to get trashed by Yi at sea (after he was released anyway, which became the most legendary aspect of his command, as his navy was given to another officer when political rivals sacked him, only to see that navy get completely crushed by the Japanese due to incompetent generalship, and he was reinstated with a very small fleet but managed to whoop his enemies anyway)