How do nodes rebroacast transactions
Nodes typically do not rebroadcast transactions. They have no reason to do so, it is not their problem if a transaction is not confirmed.

However if a wallet will likely rebroadcast its transactions, and only its transactions. Rebroadcasting works in the exact same way that broadcasting a transaction works. If nodes still have the transaction in their mempools, then they will ignore the transaction. Of course this means it will not propagate well if all of the nodes that a wallet is connected to already has the transaction but other nodes don't.