How does changing transaction data in a block change the hash of previous block? I am reading this article, within which it mentions that 

"Imagine this for a second, a hacker attacks block 3 and tries to change the data. Because of the properties of hash functions, a slight change in data will change the hash drastically. This means that any slight changes made in block 3, will change the hash which is stored in block 2, now that in turn will change the data and the hash of block 2 which will result in changes in block 1 and so on and so forth."

And I do not understand if a hacker attacks block 3 and try to edit the transaction data within it, how would this affect the hash stored in block 2? And hash of what is stored in block 2 ? 

Can someone kindly clarify for me please ? I am just getting confused.
It does not!

Next block contains a reference to previous block header hash.

Let's say the blocks are ordered as 1&lt;-2&lt;-3&lt;-4&lt;-5&lt;- with block 1 being the first block in the chain (so called genesis block).

Block 2 header contains a reference to block 1 header hash.

Block 3 header contains a reference to block 2 header hash.

Block 4 header contains a reference to block 3 header hash, and so on.

If someone changes block 3 header block 4 will not point to that block's header any more, and the part of the chain -4&lt;-5&lt;-6&lt;-... will be invalid.

Each block's header contains a construct (called Merkle root) which is derived from all transactions. Thus changing a transaction in block 3 will make Merkle root in the header of block 3 invalid and the attacker must also change that. Meaning the header will change and thus block 3 header's hash will change. Thus block 4 header won't point to block 3 header hash any more.

NOTE: On the other hand block 3 will also be invalid with respect to its required target threshold but this is another issue.