I installed Ubuntu in my laptop, I got rid of Windows 10, and Linux is the only OS in it now.
If I do a factory reset of the laptop, will I get windows 10 back?
Or, even if it came within the laptop, it is gone forever now?
The way most OEMs setup a factory reset is they have a partition on your drive that holds the original setup. If thats still there then you have a chance but if you wiped the drive when installing Ubuntu then you wont be able to do a factory reset. In that case you will have to install 10 from scratch:
The Windows 10 upgrade process drags old files, settings, and programs from your previous Windows system to your new one. Microsoft allows you to get an entirely fresh system by performing a clean install.
There is a good guide.
otherwise you can also contact your OEM and see if they can provide you a recovery disk.