The word where has several uses.
It can be used as a question adverb. In this case it introduces a direct or indirect question.
Where does she work?
I wonder where she works.
Where can be used as a relative adverb. In this case, it refers back to a noun in the main clause. As a relative adverb, where introduces a relative clause.
Do you know a shop where they sell used laptops?
Here where introduces the relative clause ‘where they sell used laptops’. It modifies the noun shop.
I know a place where you can hide the treasure.
Eventually he reached the point where he was beginning to suspect everyone.
Where can also be used as a conjunction. In this case, it connects two clauses.
Note
The preposition to can be dropped after where.
Where are you going? OR Where are you going to?
Where is often left out after words like anywhere, somewhere, everywhere and nowhere.
Is there anywhere I can sit down? (More natural than ‘Is there anywhere where I can sit down?’)
Wherever
The word wherever can be used as a conjunction and an adverb.
Wherever she went, she was followed by press photographers.
Wherever he goes, he takes his camera with him.
Sit wherever you want.
The word wherever can be used for emphasizing the word ‘where’ in questions that show surprise, interest or annoyance.
I have been looking for this key since morning. Wherever did you find it?
The word wherever can also be used for showing that you do not know where something is.
He said that he was going to Park Avenue, wherever that is.