It gets stored in the sample-slot of the instrument that is currently selected as soon as you stop the recording session. Renoise stores everything in memory until you either save the song, the instrument that contains the sample, or the sample itself to disk. Nothing earlier than that will be stored on disk except undo data if you have checked the “undo” checkbox in the sample editor. But if you quit Renoise without saving anything, you can consider your recorded data being lost.
From the moment the sample has been recorded to memory (and got stored in a sample slot) you can store it to disk using the given instructions in the earlier post.