There was a combination of factors that saved Taiwan from invasion. Other answers have gone into some detail, lazy me is relying on memory (again) to add a few more.

Taiwan is, of course, an island, so the attack would have to start from the sea. The PLA (People’s Liberation Army) was training a strong force of frogmen to lead the attack. Obviously, they needed to train in water. As luck would have it, the place they chose was infested with some sort of parasite that debilitated the frogmen. Thank you, Guan Yin, thank you, Ma Zu, thank you, 1000 Year Grandfather, thank you, Grandfather Tiger, thank you, Jesus, thank you, Odin, and all others involved.

In 1949, just as the PRC was established, Mao threw three regiments of the PLA at Quemoy (Kinmen, Jinmen) outside Amoy (Shamen, Xiamen) and they were annihilated by the ROC defenders. Mao said this was the worst defeat in the entire Civil War. It blunted Mao’s enthusiasm for attacking across water; Quemoy is within sight of Amoy, and Taiwan is much further away. He didn’t want to risk it. (I’m using the old names for historical flavor.)

The PRC Air Force led fierce attacks against Taiwan in the early 1950s, but the MIGs were beaten back, at great price, by the ROC Air Force (I have a friend whose father was killed in this effort). Most people are unaware that these battles were fought, because the MIGs were intercepted over the Taiwan Strait, so no harm came to Taiwan. But it was touch and go; the American military personnel in Taiwan made plans for “when” Taiwan was conquered, not “if.” They expected it any day, and were on pins and needles.

In the Second Taiwan Strait crisis, in 1958, Mao unleashed an enormous artillery barrage against Quemoy, which failed to dislodge the ROC defenders. At the same time, the ROC Navy pushed back the invaders. Mao was not Putin; he knew a lost cause when he saw it. He calmed down.

Remember first that Mao and Chiang knew each other personally, and that Mao had a keen understanding of history. He decided not to act too drastically. Also, he was having his own problems holding on to power. Tensions were high and the danger was great, but there were also considerations made. In the 1970s, in Air Force villages it was an open secret that every year, Chiang Chingkuo got in an Air Force plane and was flown across the Strait to Chekiang (Zhejiang) to visit his mother. So there were other things going on that we don’t know all about. At the same time, of course, infiltrators were crossing the Strait in both ways to deliver what attacks they could. But there were no more large scale efforts.

Whatever you want to say about the PRC, you can’t say they failed to recover Taiwan for lack of nifty posters.