Being in combat is determined by a creature's status as an attacker or blocker, not by its power. Once a creature has been declared as an attacker or blocker, it remains in combat until something specifically removes it from combat (such as being destroyed, being exiled, phasing out, or an effect that explicitly says 'remove it from combat'). Power is just a number used for dealing damage — it is not a prerequisite for staying in combat.
According to CR 506.4, a creature remains an attacking or blocking creature until it leaves the battlefield, until an effect removes it from combat, or until the combat phase ends. There is no rule that removes a creature from combat simply because its power drops to 0 or below.
A creature with 0 or less power that is still in combat will deal 0 (or effectively 0) combat damage, but it continues to participate in combat normally. It can still be assigned as a blocker, and blockers can still be assigned to it. It is also still considered 'blocked' or 'blocking' for purposes of other effects.
Concrete example: Your 2/2 creature attacks. Your opponent casts a spell that gives it -3/-0 until end of turn, reducing its power to -1. Your creature remains an attacking creature, proceeds to the damage step, deals 0 combat damage (a negative value is treated as 0 for damage purposes per CR 119.8), and is not removed from combat.
If you want to actually remove a creature from combat, you need an effect that explicitly says so, such as 'tap it' (which doesn't remove it from combat either, actually) — only effects using the phrase 'remove [it] from combat' per CR 506.4 will do so.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.