I’m trying to create a ligature(ae,ff etc), but I wonder if this can only be entered in OTF. And I’m curious about how to use this ligature glyps and how it works. On the keyboard, there are no keys that make a ligature.
Have a look at the tutorial: Ligatures | Glyphs
Ligatures work in all formats (even though one file type is “OTF”, all formats use OpenType feature code). There are a few ligature features in OpenType — liga, rlig, dlig — liga is for standard ligatures, which is probably what you want, and dlig is handy for discretionary (optional) ligatures.
The text shaping engine (in your browser, or operating system, for example) will notice these OpenType features, so when you type, for example an “f” and then an “i”, those two letters are swapped out with a single glyph in your font that combines the letters. Most apps do this by default for the liga feature, so it will happen automatically as you type it, and most apps will also allow you to have optional ligatures using the dlig feature, which can be turned on or off depending on the app’s settings (or in, e.g., CSS)