It depends on their position in society, and also quite where they were, time wise, under Franco. Throughout Francoist Spain, homosexual acts were illegal, and homosexuality (and bisexuality, although not mentioned) was therefore essentially illegal, with harsh consequences for anyone even suspected of homosexual sex. Accusations of homosexuality were used against political enemies, and the books and poetry from pre-Franco Spanish LGBT were ignored and forgotten, helped by the fact the majority had been killed (executed or otherwise) during the war.
In 1933, the Vagrancy Act had been passed, targeting pimps, 'social degenerates' and so on. However, in 1954, the Vagrancy Act was changed to include homosexual activity, and it was under this law that many men and women would be arrested under until it was repealed in 1979 after Franco's death. In 1944 (and it was reaffirmed in 1963) homosexual activity was declared to be 'scandalous public behaviour'. To be gay was to go directly against Francoist Spain's strict idea of what it meant to be a man, a woman and a family, it was seen as intensely political, and just by existing, you were seen as being a political challenge to Franco.
Someone found to have committed 'homosexual acts' would be punished to the full extent of the law, being imprisoned in what amounted to internment camps, where brutality and abuse was rife, called galerĂas de invertidos', the one for gay people being called Huelva, if active, of Bardajoz, if passive (as in, just existing) where they could be subjected to brutal electroshock treatments while conscious. They would not be allowed in certain areas, and once out of the internment camp, agricultural colony etc they were imprisoned in, they were to be monitored by the local police.
However, as with any country, geography was important. If you were born in a rural, conservative area and happened to be gay, then you were going to have a terrible time, whether by being forced to hide your sexuality or by being imprisoned and sometimes subjected to horrible treatments, such as electroshock therapy without anaesthetic.
If you happened to be born in a more liberal area, things were slightly better. Just as in modern countries where being gay is illegal or at least heavily frowned upon often have underground LGBT communities or more liberal areas (Lagos, in Nigeria, for example), in a couple of areas, gay clubs, communities and people were allowed to, if not flourish, exist, under the radar. Well, allowed is too strong a word, but there were certainly areas much more accepting and liberal than others, where the risk of being ratted out by neighbours was far less than other places. In 1962, the first (known) gay bar was set up, under already repressive conditions, in Torremolinos, and in other areas (accross Barcelona, and Ibiza) other places were set up, which allowed for the development of not just a sexual identify, but also a social and cultural identity.
With this development in gay communities and gay identity came other forms of expression. No, people could not be openly gay, but literature, written by gay people, with either gay overtones or dealing with homosexuality, began to be produced. In Spain, before the war, there were many LGBT writers and poets, although the majority had died during the war, whether being executed or otherwise. In some sense, this literary output was a revival of what had come before, but its language had changed- to Catalan- as well as the tone and style.
Alongside this rise in confidence and expression, which meant that although in no place could you live openly, in some areas you could more easily still survive, came further repression. By 1970, anyone accused of homosexual activity could be sentenced to imprisonement and so called 'rehabilitation' at the judge's discretion, judges having been the ones to lobby for stricter laws against homosexuality, with many being sentenced to prison for years. In 1962, Sabetar, a leading judge, wrote about how gay people were primitive savages destroying the heterosexual family, the centre and cornerstone of Francoist Spain, so any discretion given wasn't leading to leniency. In prison, sexual and physical abuse was common.
In some sense this 1970 Social Danger and Rehabilitation Act was an extension and reaffirming of the 1954 laws. However, 1970 was a very different time, having seen the growth of feminist movements in the 1960s and the development of gay identity and community not just inside Spain but also elsewhere, and therefore this law lead to far more activism than the 1954 one.
This 1970 law did face internal, and, to some extent, external opposition, particularly by one Armand de Fluvia, a jurist living in Barcelona, who contacted Arcadie, a gay rights association most famous for its magazine, just across the border in France. Arcadie attempted to lobby against the law internationally.
After the law was passed, however, de Fluvia set up the 'Homophile Group for Social Integration', a clandestine group supporting social and legal integration and acceptance. Due to the strict censorship and homophobia of Spain, its survival rather depended on Arcadie, with Arcadie publishing this group's small newsletter/magazine in France, and smuggling it across the border, until 1973, when the key leader of Arcadie was told that if he continued to do this, he could and would be charged. But de Fluvia's organisation and magazine (AGHIOS) didn't stop there, and neither did Arcadie's support. Through Arcadie, de Fluvia managed to arrange for another publisher and smuggling operation, this time by a Swedish gay activism organisation. Despite repression, unjust laws and rampant homophobia, AGHIOS managed to survive, as a result of rising transnationalist gay rights activism.
However, this was not without risk. Armand de Fluvia could be imprisoned in Huelva if discovered, and treated with so called aversion therapy. This was a very real and very strong fear, he even had to write to a famous American gay activist in 1973 begging for his name to be removed from a list of international gay activists, for fear of discovery, mentioning the threat of Huelva inside of it. In Huelva, aside from electroshock therapy, you'd also undergo emetic therapy, where you would be forced to vomit after either being injected with chemicals or ingesting substances which induced vomiting, while being exposed to gay porn, or simply anything related to being gay, whether it be an illegal magazine or erotic art. This brutal 'treatment' was deeply traumatising and severely damaged people's mental health, but also physical health. Today, those who underwent aversion therapy under Franco are receiving small reparation payments, but it is very difficult to apply and receive them.
Anyone could turn you into the police. Your parents, your friends, a nun, a priest, a teacher. Even when people began to see being gay less as a moral evil and more as an illness (necessitating brutal treatments, with this attitude continuing around the world today, unfortunately), negative attitudes and imprisonement continued, the 1970s seeing over one thousand people imprisoned for being gay, and there were fears over gay people essentially converting others, evangelising and preaching to children and an unwitting public and ensnaring them in their weak, effeminate traps. This attitude of homosexuality being a mental illness continues to this day around the world and in Spain, despite Spain largely being a very liberal place for gay people, compared to most European countries. In 1971, it was made illegal for gay people to be in primary schools, whether as general staff or teachers, due to their supposed corrupting, negative influence, and fears of 'gay propaganda' or gay people proselytising and encouraging gay rights.
It wasn't until after the end of the Franco regime that laws began to change, even if attitudes and life would, in some areas, have significantly changed during the 1960s (more liberal) and 1970s (increased community, increased repression and restrictions), with 1979 seeing the repealing of any laws making being homosexual (or rather having gay sex) illegal, also being the year when Spain had its first pride parade!
But legal consequences aren't the only consequences. Even if a friend or family member didn't inform on you to the police or endeavour to send you for 'treatment', you could often be cut off and isolated. If you didn't 'come out' to a friend, you would still be living in a virulently homophobic society, with gay men seen as effeminate, and even a direct attack on Spanish masculinity and men as a whole. If you were a woman, you were likely to be less at risk of legal consequences- it was overwhelmingly men being informed on and imprisoned, although many women still suffered- but the threat was still ever present, and your sexuality and gender identity would be implicitly questioned, your very sense of self seen as an attack on the moral fibre of the nation and community. Lesbians (and bisexual women) tended to become involved in the feminist movements of the late Franco regime, with the gay identity and community being largely male centred, the literature being largely about gay men and even homophobia tending to be directed initially against men, lesbian and bisexual women seen as a hated afterthought, an expression of the gay epidemic that had to be stopped across Spain. While gay (or bisexual) men were seen as effeminate, lesbians (or bisexual women) were seen as 'manly', and women who were independent and financially self sufficient were 'accused' of being lesbians.