If I write the first sentence as koko ni nani ga desu ka? will it change the meaning?
Yes, it will change the meaning. It would be fine only in certain contexts, like if someone had said that there was an umbrella there, and you heard everything but the "umbrella" part, and wanted to ask what it was that they said was there. In English it would be something like
A: There's an umbrella here.
B: There's a what here?
I am also a little bit confused between the usage or wa and ga.
This is a huge can of worms. Generally, here are the guidelines.
Wa:
1. Used to introduce the topic of a sentence. This is old, known, or general information. Typically it's been mentioned before in the discourse or is something the speaker assumes to be general and common knowledge. E.g., much like in English we would say "
the sun is big", in Japanese you would usually say
taiyou wa ookii. Generally, when
wa is used this way, it's similar to English "the".
2. Used to mark a contrast. This is an emphasis, but it's different from the
ga emphasis. E.g.,
niku wa tabemasen ga, sakana wa tabemasu. I'm assuming Japanese makes this distinction between "meat" and "fish".
Ga:
1. Used to mark the subject of a sentence or clause. It's a general description of something new or assumed to be unknown to the listener.
Jon ga kita is the sentence I've seen used to exemplify this usage most frequently.
Ame ga futte iru would be another example.
2. Used to mark a focus. This is an emphasis where you're putting the focus on a particular thing. For example,
koko ga watashi no ie desu would be more like "
this is my house," and
koko wa watashi no ie desu more like "this is
my house."
3. Used to mark the object of certain stative verbs, like
wakaru, dekiru, mieru, kikoeru, and potential forms, as well as two-place (transitive) adjectives, like
suki, urayamashii, kirai, etc.
To be honest, I'm not totally comfortable with them, but I'm pretty sure this is a good start. I'm sure any mistakes I've made will be corrected. I certainly hope they will, anyway.