You wack the npc and just leave your ships sitting on it...new swarms will attack randomly and while fleet is sitting on it you collect the various bonus....research though you can drop terr after you start new research as bonus only counts at start....if you are just starting, best way to get various bonus is to just group defend buddies terrs with a probe! ..mill terrs are by far the best, building next after, then either research or mining...dunno which...there are also two or three different types of building terrs...each give different bonuses