How to completely reinstall Mac OS X? I have a MacBook which OS was upgraded from Snow Leopard 10.6.3 to 10.6.8 and then to El Capitan 10.11.

I want to completely reinstall  El Capitan, to "factory state", in order to really "clean" the Mac. (However, I don't need to prevent data recovery.)

I started the MacBook holding down the "Alt" key and selected the partition for reinstalling, logged to Apple and the download of El Capitan was progressing.

Then, I moved away from the Mac for about two hours. 
When I came back, the user account is unchanged, with previously installed apps. Seems like the installer decided in my absence to keep the user files.

Can I resintall El Capitan to "factory state" without wiping the whole drive?
Or should I create a new user and then delete existing one?
You almost got it right, but you didn’t wipe the disk first. You’ll want to wipe Macintosh HD in recovery mode first (choose Disk Utility) then repeat the steps you took to install El Capitan.