You can put any Arcane 1st level spell in a Ring of Spell Knowledge 1. If it isn't on your list, the spell is considered one level higher for both storage in the ring and what slot it takes to cast.
So, a Sorc can put Magic Missile into a Ring of spell Knowledge 1, and cast from their 1st level spell slots.
The same Sorc could put Cure Light Wounds from a Bard into a Ring of Spell Knowledge 2, and cast from their 2nd level spell slots.
But the spell must be Arcane.
The action involved isn't specified. Its not really clear. Learning a spell from a spellbook normally takes an hour. However, identifying a spell being cast isn't an action at all. Since you can teach the ring a spell from writing or seeing it cast, the time could be either, or both (time dependent on how you encounter the spell).