Your alarm system likely came with a cable & jack set for connecting your alarm system to the telephone system in your home. Particularly if you are having your security system professionally monitored, it's critical that the alarm can ALWAYS get a dial tone and call out to alert the station to an alarm condition or problem. The purpose of the RJ31X (AKA CA38X in Canada) is to allow the alarm to temporarily disconnect all of the phones in the home even if someone is using them or one is 'off hook' so the alarm can get a dial tone and call out. Also if you need to disconnect the alarm you can unplug the cord from the jack and the house phones will operate as normal.
It looks scary but it's really not.
The wire portion is going to connect to your alarm panel, matching the wire colours to R1, T1, RING and TIP. Only 4 wires are connected to the panel.
The terminals on the box are used to connect your incoming phone line (R, T) and then back to your home phones (R1, T1). Only 4 screw terminals are used. In from the outside phone line, back out to the home phone feed.
Follow the diagram below.