The Magic Initiate feat states:
Choose a class: bard, cleric, druid, sorcerer, warlock, or wizard. You learn two cantrips of your choice from that class’s spell list.
In addition, choose one 1st-level spell from that same list. You learn that spell and can cast it at its lowest level. Once you cast it, you must finish a long rest before you can cast it again using this feat.
Assume a character is a 4th level sorcerer, elects to take this feat, and chooses Sorcerer. Per the feat, they now ‘learn that spell’. Also they can cast the spell for free once per day using the feat, but can they continue to cast the spell using their spell slots?
Additionally, can they replace that spell when they reach 5th level as a sorcerer per the Spells Known feature?:
Additionally, when you gain a level in this class, you can choose one of the sorcerer spells you know and replace it with another spell from the sorcerer spell list, which also must be of a level for which you have spell slots.