[noun] + は + ここ/そこ/あそこ/どこ + です
ここ/そこ/あそこ/どこ + に/で/へ/から/まで + [verb]
ここ/そこ/あそこ/どこ + の + [noun]
ここ, そこ and あそこ are "here", "there" and "over there", and どこ asks "where". They are これ, それ and あれ for places, with the same three distances.
The third word is あそこ. The other three are こ, そ and ど with こ added, but ×あこ is not a word.
ここ is a place and stands alone. To say "this room" or "this book", the word is この: このへや部屋, このほん本. ×ここ部屋 is wrong.
All four are nouns, so they take the particle a place name would take: に for where something is or where you are going, で for where something is done, から for "from".
With の they describe a noun by its place.
These go beyond pointing at a place you can see.
In conversation, そこ is a place one of you has just mentioned and the other does not know. あそこ is a place you both know.
ここ and そこ can also point at a part of what is being discussed – a spot on a page, a step in an explanation.