You have tagged the question as entity-system: "A programming paradigm in which gameobjects (entities) are composed out of components, and are operated upon by systems. Each entity is an ID that points to specific components." (note: the tags are a mess and this tag should really be called entity-component-system, ECS for short. Perhaps the prevailing terminology was different, back in 2010 when the question was asked.)
Yet, the question is about entities sending messages to each other. This is not something that exists in ECS. In an ECS architecture, components are where the data is, systems are the code that operates on the data, and entities just tie components together into coherent game objects. Entities don't do things except as defined by their components. Components don't really do things either, just tell systems what to do. When you are playing the game and you see a monster attack a player, the attack is done by (for example) the MonsterAttackSystem, not the MonsterEntity - in fact there is no MonsterEntity, just an Entity with a HealthBarComponent and a ChasePlayersComponent.
Of course, don't take this as specific advice - it might be that in your game you have something called AttackSystem or CombatSystem or ScriptingSystem, and CombatantComponent or ScriptableObjectComponent. The point is that the attack is done by a system and not by an entity, even if it makes the entity move on your computer screen and the strength of the attack is based on the entity's stats.
So with that in mind, both your questions need re-framing. Because the questions are vague, I will fill in specific examples:
How would [a spike trap] send a take-damage message to [a player]?
The TrapSystem may send a take-damage message to the HealthSystem.
One way to implement this is to directly call upon the HealthSystem: healthSystem.takeDamage(player, 20);
.
Another way is to queue this message until it's the HealthSystem's turn to run: healthSystemQueue.append(TakeDamage(player, 20));
One advantage of the latter is that if the player gets hit multiple times in the same game tick, the order isn't perceptible to players - even if one trap is enough to kill the player, they can still be hit by multiple traps and a monster "simultaneously" without revealing which trap is processed first. Sometimes this is desirable. It also means the player can't become dead at any time outside of HealthSystem processing, which can prevent bugs.
The rendering system could read the same event and use it to display an icon showing the amount of damage, like in Runescape.
How would [a monster] query [a player]'s HP [in order to target the weakest player in range]?
The MonsterAttackSystem may query the HealthSystem to find out the player's health. This should be a direct function call, because there is no reason to defer it. If take-damage is deferred, then deferring query-hp as well makes no difference, but adds needless complexity.
At least, that works in the framework I am using, where health is private data of the HealthSystem. Depending on how your particular ECS framework does things, you might instead look up and query the HealthComponent for that entity. Details, details.