Cuba was very dependent on the Soviet Union, owing to the embargo and complacency/shortsightedness generated by its social and economic successes in the 70s and early 80s. In 1987, they had their first real hint that something needed to change fast when trade between the two nations began rapidly slowing down, which was much worse for tiny Cuba than it was for the massive USSR. Owing to the embargo, the USSR was a massive purchaser of Cuba's sugar, its largest export. Not only that, but the USSR paid market prices for it when they could have easily exploited the lack of competition to purchase it far cheaper if they wanted to. Sugar was also traded for oil, with the USSR being Cuba's main source of fossil fuel. Cuban agriculture was also export focused, with 60% of food being imported, not just from the Eastern Bloc but also from Europe and Canada. The result of all of this was a harsh economic crisis, made more challenging by the US smelling blood in the water and strengthening their sanctions on Cuba.
The Cuban government actually pre-empted the fall of the Soviet Union, first taking overt action in mid 1990 and announcing the beginning of "the Special Period". This 'Special Period' was essentially the implementation of modified plans that had been originally developed in the case of a war with the United States, and it's technically still ongoing much in the way North Korea is still at war with the South. Concurrent with this, the government began to develop the neglected tourist industry and introduced economic reforms.
Food
Cuba had a pre-existing system of rationing which is not quite what you'd think of a ration system: rather, everyone was entitled to a certain amount of food products and household goods for free every month. This was never enough to live on by itself, it was more of a substantial subsidy. This system was modified; the amounts given out were adjusted substantially and many items that were previously not a part of the rationing system were added to it. This was combined with concerted campaigns of civic action and people simply adapting to the new conditions on their own. People started growing food & raising animals in any place they could; chickens in the house, crops in the local park, etc. Government-run urban farms, called "organoponicos", were established in unused space in the middle of cities. Sugar prices also crashed around this time, and the government moved to convert economically unviable sugar farms into farms for more essential products. Cuba lacked the capital to purchase modern farming equipment, pesticides, GMOs, etc, and so these farms relied on beasts of burden and natural farming techniques. Within the space of a few years, Cuba had begun producing most of its own fruit and vegetables. It was (and still is) a net importer of meat and grains, but through these efforts it heavily reduced its imported food dependency, from 60% in 1988 to 47% in 1992 and 42% by 1998. The result of all of this was that what you might expect to have been a famine-inducing catastrophre was instead a period of hardship but not starvation. The health of the average Cuban actually improved due to the reduced calorie intake, which was certainly a lot less than the 2900+ of today, averaging ~1850: not ideal, but not near starvation levels.
Cubans Adapting/Political Consciousness
Cubans (and the state) adapted in many more ways than just food production. For example, to deal with the lack of oil, large amounts of bicycles were imported from China, trailer trucks were adapted into makeshift buses, people would split the cost of fuel and carpool in crammed vehicles, etc.
Cubans also, by and large, appear to have recognised this as an economic crisis rather than a failure of governance, so there wasn't the widespread mass protests that you might expect. While this was doubtlessly at least somewhat influenced by the authoritarian nature of the state, protests still tend to pop up in such states during times of crisis or upheaval, so the relative lack in Cuba is notable. The only overt act of mass dissent was a relatively large protest in 1994 that was broken up when Fidel showed up to personally address the crowd: this is the only spontaneous mass protest in the history of revolutionary Cuba.
This section is a bit short because I just wrote the rest of it for an hour and realised I forgot it, I'll add in more later.
Economic Reforms
It was clear that the Cuban government could no longer afford to pay all of its employees, which encompassed most of the working population. The economic reforms of 1992-1995 included, among other things, an attempt to remedy this problem through the expanded legalisation of small businesses, which had previously been highly restricted. Essentially, the idea was that self-employed people and their employees (limited to family members at this point) could earn a living for themselves and pay taxes to the state. It was a win-win for the government. Also, to promote investment in Cuba, mixed foreign/Cuban ownership was made possible in some government-run sectors and remittances from Cubans abroad were legalised.
It also must be said that many Cubans were allowed to leave the country during this time for the US, and many also immigrated illegally. This was mostly welcomed by the Cuban government as a way to not only stifle political dissent but also to reduce the number of people they had to feed and pay.
The Tourist Industry
Fidel Castro had said in 1991 that "tourism was a neccessary evil" for Cuban development. Considering that pre-revolution Cuba was known for being a seedy tourist destination popular for gambling and prostitution, this was not an opinion without merit. The original intention of the 'new' tourism was to make sure tourists were seperated from normal Cubans as much as possible. The idea was that by seperating tourists from Cubans, the social ills caused by pre-revolution tourism could be avoided. This philosophy was quickly abandoned when it became apparent that it was simply impossible to enforce, though not for lack of trying. Tourism was hardly non-existent, and Cuba was popular among tourists from Spain, Italy, and Canada, but infratructure such as hotels was lacking in many places and there was huge room for growth. Still, Cuba's geography and culture that punches far above its weight made it a no-brainer considering the need for new industries in the light of the crisis. The infrastructure was already there; many pre-revolution tourist resorts and holiday villas had been neglected or abandoned. Usually those types of buildings would have been converted into housing, but they were usually in places unsuitable for long-term accommodation. The government quickly renovated these and rapidly expanded infrastructure for and promotion of the state-owned tourist industry. Even without easy access to the massive US tourist market, this was a resounding success: tourist arrivals went from 400,000 in 1991 to 1.4 million in 1998, mostly from increased popularity in the previously mentioned source countries.
Around the same time, the US dollar was legalised and as mentioned earlier Cubans could for the first time open their own businesses that gave them the chance to exploit this new opportunity, such as restaurants, street food stalls, homestays, etc. Many who weren't officially self-employed also started working informally as guides, taxi drivers, buskers, etc, because while Cuban pesos went a lot further than you might think considering that state employees were paid the equivalent of $20-30 USD, due to extensive state subsidies on almost all goods, the power of the USD was and still is simply massive in such a situation. So not only did tourism provide the largely government-run economy with much needed foreign currency, but it also greatly improved the situation and independence of many Cubans. This did however create income inequality among the general population, something that revolutionary Cuba was almost entirely unfamiliar with, as people who exclusively work a regular job for the state are now at a disadvantage due to their lack of easy access to dollars (today replaced by unconvertible pesos pegged to the US dollar, but dollars used to be much more pervasive).
So, in short, the crisis resulting from the fall of the Soviet Union did not result in a collapse/more severe crisis due to organised government action which was perhaps only possible due to the extensive control of the state, and also due to the ingenuity, perseverance, and social cohesion among everyday Cubans. By the mid-late 90s, the shifts in food production were well established, the tourist industry was booming, and the crisis had largely been averted, though technically Cuba is still in the "Special Period in Peacetime".