after a few games that i have lost because my mates didnt know how to react to locked portals here are a few things i know and i think there are more experienced players out there who have additional tips.
beginner tip: if there are no enemy catapults on the field its not that important that you regain the portal though you will lose some money (creeps coming out of the portals give you money) and the lane is open for the creeps to attack the other towers on their lane directly. generally: if there are no cats it means the game is still young and your sidetowers should still be intact. so if you still have a sidetower and the enemy is dumb enough to tele in to lock the portal its fun to telegank them! that means one stays at the flag outside of the range of sight and waits for the teleport. one of them teles in and trys to relock (at best you stun or interrupt him when he does that). your mates tele in to the sidetower and together you kill that guy. usually the enemies aint that dumb or they tele in together but for some it might work.
basic rule at what time you really, REALLY need to get back the portals:
when the enemy catapults are on the playfield get the portal back asap!!
why then? if you have lost the portal after cats hit the field and you still have intact sidetowers then they will fall pretty soon same for inner towers at your citadel. this is the point when one of you has to stay at the portal to kill the creeps because if you towers are dead its far simpler for the enemy to run for the portal again and again and again!
most important counter measure tip is: save your interrupt or stun! if they try to relock - stun or interrupt! be aware that there are some chars that have "counter measures" like shield, silence or mass charm.
BUT often the enemy waits for the flag do become unlocked before they tele in to relock. thats not bright. try to get a feeling for when it unlocks. the cooldown helps sometimes but on cataract its not precise because of the cooldown flags.
solution: lock the other portal, lock the center and go to the flag. in a 3v3 this is very helpful because the flag will turn yellow so fast that they cant relock if they are not already standing there. even if they do stand there: in a 3vs1 situation (you are 3, enemy one) the flag will turn slowly to yellow! the enemy has to lock it soon if he doesnt want it to turn yellow.
if you have a ranged interrupt (oak, sedna, tb, ereb) you can try to stay outside of their silence/mass charm range and interrupt them anyway afterwards.
the rather advanced tip:
now this is a rather difficult thing to do but it works quite well - even against good teams! if the other team aint good they wont come to help their mates if one tries to relock. thats good for you and mostly you dont need anything else than a superior number of demigods on the locked flag and at least one interrupt. good teams will tele in and help though. you wont have a chance to regain the portal in an even fight. you cant use your stuns, they can. if you do use your stuns they relock when you are on cooldown. if you dont use them you lose the fight (at least in an even match). so you cant win this. at that point take the idiom offense is the best defense! you gotta run for one of their portals. that means you should stand at their portal roughly at least 25-35 seconds after they locked your flag (the later the better but not too late). now you have to pray that one of them teleports in. then you got two options. either you are stronger and get the flag by fighting which is mostly not the case or you fight a bit and wait for their stun. then you tele out to your crystal. if your mates are both defending its time to lock the other portal and the center flag and go to the locked portal. now you fight at least 3v2 or 3v1 because one of them ported to you when you tried to get their portal. this means you got a far better chance. this works best with oak or sedna (actually she is the best for this) because they got shield and silence to safely teleport out. sednas silence should be almost ready again when she stands at the locked portal, shields cooldown is far higher.
other tips:
you should have a tp on you after your first shop. really... if i have the choice between an item like unbreakable and a tp i get the tp first.
when catapults hit the field its time to get locks! i dont know how often i have lost a game because my mate didnt have a lock after the enemy reached lvl8 warrank
chars with high aoe (area of effect) dmg fight in the center (occ or tb etc.). never ever let a sedna defend the center! she should run for the enemies portal or defend the locked portal (if you dont manage to get 3 to the flag...) she doesnt stand a chance in the center especially not when giants are there.