Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
Looking at the internal schematic of a 339 typical comparator...
The first stage has a current mirror similar to an op amp.
The next stage is not as complex as an op amp.
The output is simply connected to the collector of an NPN transistor. The emitter goes to ground.
The most significant difference from an op amp is that the comparator's output can go to zero, and the comparator can use a single supply. This makes it easy to use in binary circuits where you're only interested in hi or low signals.
Also to get positive voltage output from the comparator you need a pullup resistor. An op amp doesn't need it.