Typically, raids were carried out by small teams of men who would black up their faces with burnt cork before crossing the barbed wire and other debris of no man's land to infiltrate enemy trench systems.
Standard practice was to creep slowly up on the sentries guarding a small sector of an enemy front line trench (looking for the glow of cigarettes in the dark or listening for conversations) then kill them as quietly as possible.
Therefore, it was a typical procedure to notify sentries along the line whenever raiding parties were sent out, and to use some form of password system so that returning raiders could identify themselves when challenged in the dark.
[1] The choice of weaponry was deliberate: the raiders' intention was to kill or capture people quietly, without drawing attention to their activities, and this would have been impossible if they had routinely used firearms during raids.
Trench raiders were also armed with more modern weapons such as pistols, shotguns, submachine guns, and hand grenades, though these were only intended to be used in an emergency i.e. if the enemy discovered their activities and raised the alarm.