I see you already have a very good answer from Transistor (upvoted), but I want to clear up a specific confusion in your question.
Output of TSOP1738 oscillates at the rate of 38KHz,
This is wrong. The IR input to the TSOP oscillates at 38 kHz. This is the carrier frequency the TSOP is looking for. The purpose is to be able to detect the TV remote's IR signal from the IR background. There can be significant ambient IR, but that isn't going to be modulated at 38 kHz. To be able to "tune out" the ambient IR, the TSOP is looking for modulation at a specific frequency that is very unlikely to occur by natural causes or without deliberate action.
The particular carrier frequency is built into the TSOP. Variants are available in a range of fixed frequencies they will detect, somewhere from 30 to 45 kHz if I remember right.
Reacting to only a narrow frequency is the same as what a typical radio does. If you tune your radio to 1.03 MHz, then you only hear that station. It doesn't matter what a radio station broadcasting a 980 kHz or 1.08 MHz is doing.
The TSOP demodulates the IR carrier, which in this case is 38 kHz. It essentially puts out a signal telling you whether it sees this carrier or not. Of course it takes a few cycles to make sure the carrier frequency is really there. The tighter the frequency band around 38 kHz, the longer it takes to make sure that's really what it is receiving.
In the case of the TSOP parts, I vaguely remember that they promise to assert the output after a maximum of 8 carrier cycles are received. I used these parts in a IR remote system once, and I remember making the minimum carrier pulse length 10 cycles.
So the TSOP output does NOT tell you when individual carrier cycles are received. It tells you when enough continuous carrier is received to be sure it really is the carrier. That signal won't toggle anywhere near as fast as 38 kHz.
For example, let's say that you are transmitting bursts of 38 kHz carrier of 10 cycles long, with gaps in between also 10 cycles long. The data part of the signal you are sending is really a (38 kHz)/20 = 1.9 kHz square wave. The TSOP output will therefore be a 1.9 kHz signal, NOT bursts of 38 kHz.
Added in response to comment
Don't think of it at the level of individual electrons. Look at the macro features of voltage and current.
When the TSOP detects the IR carrier, it pulls its output low. This is done with fairly low impedance, so discharges the capacitor quickly. When it stops pulling low, the capacitor gets charge up again thru R1 and the internal pullup in the TSOP. Those together are much higher impedance, so the capacitor charging up takes longer. Transistor estimated that Q1 will stay on for about 100 ms after the TSOP releases its output.
capworks and when are the charges stored in that1 microfaradcapacitor released? Thanks – user1764381 Nov 04 '17 at 19:34