When Harry and Hermione got back from saving Sirius they arrived the moment in which Dumbledore was about to lock the door and also when the past Harry and Hermione left. So what exactly happened to them? The past ones I mean?
Here is the moment when they get back to the hospital wing:
Dumbledore backed out of the room, closed the door, and took out his wand to magically lock it. Panicking, Harry and Hermione ran forwards. Dumbledore looked up, and a wide smile appeared under the long silver moustache. 'Well?' he said quietly.
'We dit it!' said Harry breathlessly. 'Sirius has gone, on Buckbeak ...' Dumbledore beamed at them.
'Well done. I think -' he listened intently for any sound within the hospital wing. 'Yes, I think you've gone, too. Get inside - I'll lock you in-'.
They disappear into what is now the past. When Dumbledore says "you've gone" he means "the past version of you just used the Time-Turner and went into the past". Which they did.
one would assume that one would vanish when you travel back in time and reach the present but you may say you would teleport to the present version of you in the movie at least the characters seemed to be affected by their past selves (harry was hurt when the pebble hit his past self) this is of course all theoretical since time travel has not been achieved.