There are two separate things players call the "invincibility cheat" in Fly Like a Bird, so here is how each one works.
First name your bird and finish setting it up. Then, instead of entering the room straight away, go to the "enter the room" screen and click your chosen room four times very quickly. After that, have another bird poop on you — and watch your lives counter. It does not drop.
Note that this used to be three clicks. That no longer works; it takes four now.
This only blocks damage from bird poop. Landing hard, crashing, or getting caught by the suit or the traffic warden will still hurt you exactly as normal. There is no point testing those to see if the trick covers them.
A second method some players use is typing a short string of underscores into a text editor, copying it, and pasting it into the name field during multiplayer. The idea is that a blank-looking name makes you harder to notice. Results vary, and it is more of a hiding trick than true invincibility.