It is an iterator function. Each is a function of the Array class where it passes through all objects within the array giving them the local variable name defined between the || marks within that block.
So, it passes through each character within your party. Between the { } marks, each actor will be defined as
a since that is what we told it (through |a|). From there it is just a matter of adding the hp value to our n counter. Could have also wrote it like:
@actors.each do |a|
n += a.hp
end
# or
for a in @actors
n += a.hp
end
# or
for i in [email=0...@actors.size]0...@actors.size[/email]
a = @actors[i]
n += a.hp
end