Well I am in a long distance relationship(two different countries). I gave my account pokemon go account to my gf(who is not interested in pokemon go but plays for me and pretty sure she wil give up soon). We play it at two different times. We never play it at same time. Its fun. Will they block my pokemon go account for this?
Yes, they will soft ban you (or permanently). You should use separate accounts.
There's no way to differentiate between legitimate account sharers and people who location spoof / hack.
If you must, make sure you wait the travel distance between you and your girlfriend plus a few hours. You shouldn't get banned since it's plausible to travel the distance in that time. However doing this often may get you banned anyways.
As everyone else mentioned, yes you can get banned. Sharing accounts is against ToS, let alone sharing across a large distance (which can seem like GPS spoofing).
So not only is it not allowed, this is a high risk situation that can easily get you flagged.
I don't know why you're sharing an account when you can both create your own. Regardless, I would advise you make a different account for one of you to use.