あの、 その、 この、 どの are demostrative adjectives. That means we use them before a noun. For example: このくつ、 その車、 あのかさ、 どのひと？。
あれ、これ、 それ、どれ are demostrative pronouns. That means they are used instead of a noun to avoid repetition because we already mentioned that earlier on.
あれ、あの are used to refer to something or somebody that is far from the speaker and the listener, その、それ to refer to a person o thing that is close to the listener, but far from the speaker, これ、この to refer to something or somebody that are close to the speaker and far from the listener . どれ、この are used in questions to ask what or which.
あちら、 こちら、 そちら、 どちら work in the same way when we talk about directions.