As user Bjorn Roche pointed out, this is not a very clear question. If you want that exact sound, just output the samples you see there. If you want something similar, that example looks a bit like an amplitude modulated sinusoid.
Generating sines, saws, squares, etc. is pretty straightforward, but also boring. Synthesizing sounds and waveforms is a large field that includes lots of differing approaches. For getting interesting oscillator outputs, you can use a wavetable. Beyond that, you can use standard components and then filter, modulate, etc.