The black LED is photo transistor. This means the current through this part is controlled by the IR light intensity on a certain wavelength. The output is a real analog signal without any processing and signal forming.
The three pin 1838B is an IC, which is also a IR receiver with integrated pre processing of the analog signal. In this particular case this devices has a \$38\,kHz\$ filter, which corresponds to the IR carrier frequency of some IR remotes. It also demodulates the IR signal and generates a digital output. Perfect for reading data from remotes.
According to your use case, you can pick either of them.