While building their outpost at the end of When Darkness Falls, Hiccup tells Astrid that she can build the most heavily guarded bedroom in Viking history. So she does; complete with a large, powerful ballista on her roof. Whenever Astrid's hut is seen on screen starting with Gone Gustav Gone, the ballista can clearly be seen on its roof.
We first see it used in Snow Way Out when Snotlout uses it to fire paint balls at Hiccup and Toothless as a training exercise. When he manages to hit both the dragon and rider with paint balls, Toothless shoots a plasma blast at Snotlout, knocking him of the ballista's platform.
It's first mentioned however in Edge of Disaster, Part 2, when Astrid tells Tuffnut he can use it to defend the Edge from invading Dragon Hunters. It's mentioned again in Defenders of the Wing, Part 2, when the Dragon Hunters take over the Edge including the ballista, and the riders themselves know how powerful it is. They fear even they would never be able to get past it because they know what an excellent weapon builder Astrid is. But Mala, with Hiccup and Toothless' help, is able to disable the Hunters operating it.
The weapon shoots massive spears, otherwise known as ballista bolts, and lies on a rotating metal platform for angling, and is also able to be tilted up and down. the sides are decorated with blue, swirling lines with yellow dots. The front has purple dots inside yellow circles.