You are mixing two things.
A registrar change, that is a domain name transfer from one registrar to another, is done without any other change to the domain name. So the nameservers will not change. This is a general rule but there are exceptions based on the TLD involved, you do not say which.
Here is a typical flow:
- you go at the new registrar to ask for the transfer. Maybe it asks for new nameservers at that point
- the transfer is started
- at some point it succeeds, hopefully
- then, and only then, can the new registrar change the nameservers. If it asked you for them beforehand it can do the change immediately after the transfer or else you can do the change at any time going through its web interface.
So, with this flow there is never a downtime. The registrar transfer is a business change not a technical change.
The exceptions are that, in some TLD, when the new registrar starts a transfer it could at the same time provide new nameservers: in this case the end result is very similar, but it will be the registry that will change the nameservers as soon as the transfer completes.
Now a bit of caution, specifically if you use the nameservers of your registrar: some registrars (contrary sometimes to some contracts, and at least to good netizenship) will cut service for your domain name on their nameservers as soon as the transfer finishes!
If you are in this case, here is the relevant flow to apply if you want to avoid downtimes:
- at the current registrar, change your nameservers so that they correspond to something that works now and that will work after the transfer too (either use a third party providing DNS services not being the current registrar, or ask the new registrar if it could provide you this service); of course test that the new nameservers are working before switching over to them!
- wait "some" time: many resources online will quote you 24/48 hours without any explanation, and since it is a complicated topic I prefer to summarize saying: take your time, do that change one week early
- now do the registrar transfer
- and after it completed, nothing else to change anymore as the nameservers were already the good one before the transfer and the transfer by itself does not change them.