Electrical Engineer here. The device you are protecting is what determines the breaker size. In your example, your dryer will likely have a nameplate which will provide its operating current. This value is usually slightly less than the breaker rating. For example, a random GE electric dryer I found on Home Depot has a rating of 5600W @ 240V, which will pull approximately 24 amps.
Now, why would you not size the breaker at 25 amps? Well, technically, I don't think there would be anything actually dangerous with doing so, however, the voltage at the outlet may not actually be 240V. Your utility may have some voltage drop at the transformer, and depending on the length of the conductor from your breaker to the dryer, you may have some voltage drop too. With voltage drop, comes a rise in current. There is also inrush current on the motor during startup, which may spike current temporarily. If that spike is more than the breaker rating, it will trip. This is why the typical breaker for a dryer circuit is 30A.
Now to answer the original question, can you put a 50A breaker on a 30A device. The short answer is no. The device will work, but in the event of a fault on the device, the current may not be high enough to trip the breaker, but it will be high enough to cause damage inside the dryer or to melt the wire from the breaker to the device (assuming its wire rated for a 30 amp load). The manufacturer will typically list the maximum/minimum size breaker required.
Finally, wire size. As long as the wire ampacity meets or exceeds the breaker size and the amp draw of the dryer, you are good to go. Just be sure to take voltage drop into account, 3% is the max allowable drop. If you have a long run from the breaker to the dryer, you may need to size up. I did this for my A/C compressor, which requires 30A breaker. 10 awg wire (typical for 30 amp circuits) was right on the edge of having too much drop for the length of my run, so I sized it up to 8 awg just to be sure. Really, the only downside to sizing up wire is a bigger hole in your pocket haha. Hope this helps.