I've just started learning Japanese, and I've been told that the か at the end of a sentence is playing the role of a question mark (at least in formal Japanese). How does the sentence change if the か is removed? Does it just go from "How are you?" to "You are."? Or am I missing something here?
元気 means "fine" and お before 元気 describes politeness (to the listener = "you").
です is "be" and か makes it a question.
You may notice that there is no subject, but it can be inferred to be "you", because it is a question.
Therefore お元気ですか literally means "Are you fine?"
By removing か, it might become "You are fine." but resulting お元気です is not natural, as its subject is no longer clear and the お for politeness doesn't match here.
If you remove お, you get a natural sentence 元気です which means "I'm fine." In this case the subject is still ambiguous but is likely to be inferred as "I"