Can you help me to realise when should I use the right tense.
There are some verbs that tend to take one tense and other verbs that take the other - even if it is difficult to see the logical difference.
1. "I have been
living here for three years"; "I have lived here for three years." Both right.
2. "I have been
loving you for three years." No, you have to use the non-continuous form for this (almost always), even though living and loving are just as continuous.
emsr2d2 has given other examples. 'Having' and 'owning' are not used in the continuous form, but the having and the owning are continuous states.
In fact, you can say, "I've been having these pains for three years", which usually indicates a non-continuous condition (it's episodic), whereas "I've had this pain for three years" (usually) indicates a continuous condition!
So you can't choose just based on the logic. I wish I could give you rules, but I don't think there are any that can be given explicitly without many exceptions.