The valve should open before TDC, about 20°, then the cylinder breathes flames on the downward stroke, and the valve should close just before BDC, this point has to be set while testing, say 10° before BDC to start, adjusting matters here.
after BDC, pressure decreases inside the cylinder upon cooling, up to less than atmospheric pressure, which pushes the piston back to top for about 90°, this is the motive phase, then as the volume decreases, pressure raises in the cylinder, hence the opening of the valve before TDC and the cycle continues, hopefully.
the closure of valve before BDC depends of lots of factors...
too early, the engine bounces, and cannot pass the BDC, a larger flywheel may help.
too late, air inside is not cooled enough after BDC to induce motive power.
You may appreciate the tiny power this cycle develops, hence the absolute requirement for free mechanical movements, coupled to a faultless air tightness.