Payment, expiration, insurance, etc.

Hello together, I have a question or questions about the payment. Suppose I have found a car and would like to buy it now and give my old car in payment, how exactly does this work? Here are my questions: Do my car have to stay right there when a payment is agreed, or can I drive with it until my pick-up is ready? (I would have the registration made by the dealer) How about the registration, does the dealer take care of the problem for me? Insurance and customs are then automatically informed after registration by the dealer, should one nevertheless give notice beforehand? Do you get back from insurance and customs the remaining amount for the unused months ? I think that would have been all questions, especially the point whether you can transfer the car only when the new pick-up is ready, interests me very much. Because assumed the dealer is then still further away it would be a little cumbersome. Thanks for your answers.