ここに (koko ni) means "here" and indicates the location. Think of the particle に (ni) as a finger that points directly where you are standing when you think of ここに!It's often used when verbs of motion are used (come, go, etc.). For example:
明日はここに来ます。 (ashita wa koko ni kimasu) "I will come here tomorrow."
ここで (koko de) means "here" in the context that a particular action is occurring in a specified location. Think of being in a particular place doing the same thing all "day" (sounds like "de," eh?). For example:
ここで本を読みたいです. (koko de hon wo yomitai desu.) "I want to read a book here."
I hope my examples and mnemonics help you. If you have more questions, let me know.