Lots of great comments here already. I realized I didn't really know what 'playing by ear' means! (Jazz pianist here) I've almost never heard musicians saying that. Like people have written, it means many different things. Such as, playing a song with other people when you don't know it. Some jazz musicians I've known are legendary for that, seeming to not need to rehearse like mere mortals, they turn up to the gig and play perfectly.
What does it feel like? Like talking, walking. Something you can do without thinking about it. Well, sometimes I notice my fingers are playing music (on a table, wall, my legs, I can hear it on the 'piano in my head') and I didn't realize! I don't know who that was playing.
Any time I hear music (unless it's super-fast, or using strange tuning etc) I can see every note being played on the piano in my head. The instant I hear a chord, I already know what it is. (I guess perfect pitch helps with that; I don't know how people manage without it) And transcribing helps with learning rhythms, so you just know what a rhythm is (i.e. how you would write it down) when you hear it.
Some very famous musicians e.g. Hendrix, Erroll Garner, Sinatra apparently couldn't read/write music, but I don't think it's been much studied exactly what they knew or how they thought about music. In jazz anyway, most of what you know (about melody, rhythm, harmony etc) is never put into words - you learn it from the music - and it would be useless trying to put it into words. I can teach in an hour most of the 'official' music theory. Everyone should have their own ideas about, say, what scale to play over a minor chord, because what sounds good is different for everyone.
People learn jazz by listening, and by transcribing tunes, solos, arrangements (if they're complex enough that you can't learn by playing along, which is most things.) and playing them yourself. By imitation. So maybe learn to read/write music, then you can write complex things out. Although, hell, I don't know, maybe it's better training your ear and never transcribing. But that would take soo long. Learning stuff that is really fast is pretty much impossible to hear/learn without writing it out.
'Which keys to press' is like 'How do you know what computer keys to type?' - when you learn a language, or anything, your brain puts things together in bigger and bigger chunks, so eventually you can think in units of sentences or paragraphs or whole speeches. Or in music, you think 8 or 16 bars at a time, or a whole phrase, or chord progression etc. Or apparently in chess, masters just have better chunks than the rest of us; they can do much more useful thinking with the same number of thoughts. Exactly like a high-level programming language!
ps Speaking of which, I can't help mentioning that the guy who invented restricted Boltzmann machines (a type of neaural net), Paul Smolensky, called them Harmoniums! https://en.wikipedia.org/wiki/Restricted_Boltzmann_machine