Comparators are give out redstone when something is activated or a chest or hopper has something in it like after a command block was successful with no red text then it would give out a signal. The observer activated when the little face detects some kind of block or entity in the way then it gives out a redstone signal.
Thanks for asking!
-NightmareGameee