Arduino IDE and writing libraries

I have read through various tutorials on writing Arduino libraries, and they are great for teaching the syntax and structure of a library, but they never get into the real basics of things such as how to let the Arduino IDE know that you are writing a library so that it will save a file with a .h or .cpp extension instead of the .ino extension. Is it just up to the user to rename the saved file with a .h or .cpp extension?

but they never get into the real basics of things such as how to let the Arduino IDE know that you are writing a library so that it will save a file with a .h or .cpp extension

Writing libraries is not a beginner topic. By the time that you are in a position to be developing a library, it is expected that you will have at least moused over every icon on the screen. One of them lets you create a new tab, with any extension you like, like maybe .h or .cpp.