How do I get this Fourier transform?
You did not specify what sampling frequency you used to compute Fourier Transform. Software like MATLAB/GNU octave are only simulating an analog signal with high enough sampling rate. As a very general rule of thumb, if you know that time domain signal has a high periodic component of 1KHz, a 10x sampling frequency will give comprehensive results.
The pseudo-random waveform you showed on the left is a real and periodic signal and so we see real part of the FT is even-symmetric and imaginary part is odd-symmetric essentially meaning you can drop the left half plane from FT and focus on frequency values greater than zero. If you choose a sampling frequency correctly, magnitude response of the FT should show you peaks on frequencies which have the major share in your time domain signal e.g. 1KHz and 3KHz cosine signals may makeup (of course along with many smaller contributions from other cosine signals) the waveform. The real and imaginary parts are useful to compute the phase plot from FT essentially telling you how much delay should be added to cosine signals in order to make an approximation of your time-domain waveform.