Just make sure that you retain the extension when renaming the file. For instance, let's say you have a file called 'some file.txt'. The '.txt' part is the extension, and describes to the computer how that file is supposed to be used. If you try to rename it to the name 'another file', WITHOUT the '.txt' at the end, there will be no extension in the name. A file can absolutely exist without an extension, and will retain exactly the same contents it had before, but without the extension your computer will not know how to treat it if you attempt to open it. However, renaming it 'another file.txt', WITH the '.txt' at the end, means the computer still knows that it is a TXT file and will treat it accordingly. When you rename a file and try to get rid of the extension, your computer is giving you a warning that getting rid of the extension will cause the computer to not know how to treat the file. It's just a safety feature to make the system more idiot-proof.
Note that things can get a little more complicated, though. For instance, if you rename the file 'some file.txt' to 'another file.jpg', that is, change the extension of the file, then the computer may not give any warning, but will likely encounter an error when trying to open the file (because JPG files are encoded in a totally different way than TXT files). Similarly, sometimes a file may have a name like 'some file.txt.jpg', with apparently two (or even more) extensions on the end. In such cases, only the last extension is used by your computer, however under certain settings that one is omitted and all the rest are displayed in the name as you see it on your screen. Hackers sometimes use this fact to trick people, such as naming a file 'vacation photo.jpg.exe' and then getting someone to open it, since they may see 'vacation photo.jpg' and the '.exe' will be hidden to them, but still recognized by the computer. If you want to ensure that the file extension will always show on your screen, there are settings you can change to do that (and I highly advise doing it).