You have basically asked the election process :p
So, here is what happens.
All switches that have STP enabled (which is defaut setting in most switches), send out BPDU's.
What the BPDU mainly contains is this : a. the ID of that switch b. The ID of the root according to that switch (At the beginning of the process every switch thinks it is the root).
As Ron pointed out, This is sent on a link local address which means that it will be sent to all the devices that are directly connected to the switch.
(Yes even end devices like desktops can receive this message but they will discard the packet as STP is not enabled on them)
Now as a switch when you receive the packet from all your neighboring switches, here is what you do, you compare their ID with your ID.
One of the two things can happen - your ID lower than their ID in that case you still think you are the root or you find out that your ID is not the lowest.
So in the next BPDU packet you will replace the root ID with the the ID of that device.
Now this process continues till all the devices unanimously agree as to which device is the root.
At this point the election stops and the root is elected.
I dont fully understand by what you mean by upward / downward packets, but after the root is elected all switches send their BPDU
hello packets before the dead time to the root (in RSTP not very sure about this) and the root sends its
hello packet (STP and RSTP).
if any device fails to reeive the hello packets before the dead interval there is a re election which I am not mentioning in detail here
BPDU's are forwarded on the designated ports
After the election, the non root switches can have one of these links:
a. in designated state - the one which is that is used to connect to the root
b. Forwarding - literal meaning , not connected to the root, but forwards packets
c. blocked - the link that could potentially cause loops and thus is blocked.(cannot send but can receive packets)
Hope it clears your doubts ..