It depends largely on where you live (country) & then also, what kind of facility or place you're checking into. So I'll go with what I'm familiar with here in the states. With many admissions under my belt. You can go in through the ER. Where the general criteria will be, that you (a) have a plan & (b) a time, or dead line - presumably sometime soon... If both of those criteria are satisfied, and they firmly believe you - ER doc, etc. Then the only other question or potential is the number of beds, or limited space for intake. If you're deemed to be given a 72 hr. hold. This is now for involuntary admission, by the way. You will be transferred to another facility which can then house you. Sometimes it isn't even about the number of beds available, but the number of staff (i. e., nurses).
Only other way that I am aware of, is voluntary admission (& this is much, much harder). Or, if you get your p-doc to send you there. As far as how it is in there. Well, maybe your experience will be better than most of mine, but don't expect to be treated with anywhere near the same respect (level) as any other dept. in the joint/or hospital. Expect the nurses & other staff (but not necessarily psychiatrists or psychologists) to treat you like your not deserving of their care, or that you are worth less than the average - you know, "normal" - human being. Is it as bad as a criminal is treated in prison? Good question, I have never been...
That said, it can do wonders for you IF you are interested in averting a serious attempt, and the only way out of that, is to be given a bit of a scheduled break, from the everyday monotony of things. So sometimes, what is quite common for patients to experience is: & this is even more so just depending on the matter & the level of 'crisis,' that they are in. . . but this "time-out," can relieve a lot of stress. And they can then feel more at ease, and dare I say "happy?" Maybe not that far, but even if only (more) normal, as in normalized or neutral - then that may feel to you like positive used to~
However, very often upon release it will hit you like a cold slap in the face. Once you walk out those doors and have to return to the realities of life. As far as, what goes on inside? Can be chaos, or not. Depends on who else is in there. They do have drugs to inject into you if you get too out of line & present a threat. And they are all trained in restraining you by manual means, or by their own team of bodies. I will say when I hear accounts of other stories from other countries it doesn't sound anything near as bad or as uncomfortable as what I have witnessed myself. They seem to enjoy a lot more freedoms. But the goal here is generally to just keep you from killing yourself in that moment, and not so much about helping you to rehabilitate yourself.
Hopefully that helps! :)
Oh, and if you're lucky (or "Un!") You can get your 'shock-therapy,' done there as well... this will require a much longer stay, however~ ;D