How can I get the public key? I am wondering if the public keys are broadcast to the network. I know that we are using addresses derived from the public key, but could we get the public key itself? Does this depend on which wallet the user uses?
The public key becomes known once you try to spend the output as part of the transaction spending that output. Before then only the address is known. This is one reason you should not reuse the same address twice, although a more important reason to not do that is your and others' privacy