I have installed a linux distribution alongside windows 10. Now when I turn on my pc all what I see is the linux distro on grub bootloader. I thought that grub would make choosing an OS to boot from of the two possible.
It depends on the distro. For Ubuntu, for example, the setup screen should have looked like this:
If one accidentally picks the second or third option, it can wipe out the Windows partition. Assuming you've not done that, then the easiest approach is to reinstall Linux from Live media, assuming you've not done much to modify Linux after installing. If all goes well, you should have a menu similar to that below.
If the original Linux installation has destroyed Windows, then the only practical option is to restore from a recent image or from Windows installation media. [Recovering a deleted or modified partition is difficult, at best.]
After some time, I realized that I have booted the linux cd with UEFI while windows boots from BIOS legacy. I used the windows installation media to fix the MBR and then reinstalled kali with BIOS legacy and now both OSs are shown from grub. Though when booting the win installation media, I booted with UEFI to do the "bootrec.exe /fixmbr". Will this result in a problem in the future?