In my (American, public school) education, I was taught that, while suspicion of being a Communist was a good way to commit social suicide, it was not literally illegal to self-identify as one, absent of any other wrongdoing. At the same time, however, we were also taught that there was a climate of paralyzing fear during the Red Scare and that even the suspicion of having left-wing sympathies could permanently ruin a person's life.
I'm wondering how these two things manifested together in practice. Was there something other than social ostracism that suspected Communists were threatened with, or was community pressure really that great? Would a given person face any harassment by law enforcement or the government, even if they weren't technically charged with anything?
Or, to phrase it a different way: I'm called to testify before Congress, and I stand up and say: "Hello Senator McCarthy, my name is X, and I'm a Communist." What happens to me?
Not to discourage further answers, but this background I wrote previously.
Just to expand on it for this discussion: what McCarthy technically was doing was looking for Soviet spies, not Communists - it kind of didn't matter if someone was actually a communist - he was happy to target anyone who was a mainline Protestant, an Ivy League graduate, from the Northeast, someone known or suspected to be homosexual, or just someone he personally disliked and enjoyed publicly taunting. McCarthy's hearings publicly outed zero spies, by the way.
The Red Scare (from about 1945 to 1955) more generally did target Communists, but I think here again we should be clear what a "Communist" meant. It's different from our current age where you can like Marxism, maybe subscribe to r/communism and basically declare yourself a communist. At this period being a Communist meant being a literal card-carrying party member: you had been vetted and accepted as a member to a highly-disclipined, semi-clandestine, hierarchical organization that had close connections to the Soviet Union (in the case of the Soviet Party itself, historian Sheila Fitzpatrick has compared it to belonging to a quasi-Masonic organization). If you were a "fellow traveler" (a kind of clunky translation of the Russian sputnik) then you weren't a member, but had close personal connections to members and most likely belonged to a Communist-run front organization.
People suspected of such backgrounds did face consequences during the Red Scare: if they worked in the movie industry they were blacklisted by Hollywood (meaning studios pledged to not work with them). A couple thousand federal employees were fired from their jobs, and more voluntarily resigned. Universities also fired professors suspected of such associations. 144 officers of the Communist Party of the United States (CPUSA) were put on trial starting in 1949, but these trials dragged on for years, and technically the charges were the calling for the violent overthrow of the US government, rather than being communists per se.
Interestingly, people did testify before Congress to being Communists: Whittaker Chambers comes to mind. However in his case it was to testify against Alger Hiss (who he claimed to be a Soviet spy). There wasn't a specific result to doing this: no one was going to lead you away and arrest you for publicly stating this. But doing this if anything would indicate that you were probably looking to inform and provide info on other people more than anything else.