How fast does it take to create a magnetic field in a solenoid? If a solenoid/electromagnet has current flowing, it creates a magnetic field. Electricity is very very fast, I believe close to the speed of light?
So, when power is given to a solenoid with $n$ turns, how fast is the magnetic field created?
Similarly the same question, but for the case of a wire.
 A: Electromagnetic fields propagate at the speed of light, however in a real circuit the rate at which the electromagntic field grows is controlled by the inductance of the solenoid.
You probably know that a changing magnetic field through a conductor creates a current - this is after all the way all our electricity is generated. When you apply a voltage to a solenoid the magnetic field starts growing, but the growing magnetic field through the solenoid creates a back EMF that opposes the applied voltage. The end result is that the formula for the current in the coil is:
$$ \frac{dI}{dt} = \frac{V}{L} $$
integrating and assuming $I = 0$ when $t = 0$ gives:
$$ I = \frac{V}{L} t $$
where $L$ is the inductance of the coil. The magnetic field is proportional to the current so we get:
$$ B \propto \frac{V}{L} t $$
So the rate of increase of the field is determined by the applied voltage and the inductance  of the solenoid. The value of $V/L$ gives you an idea of the timescale. It's not unusual to have inductances of $1$ H, so with a $10$ V supply the timescale can be as long as a tenth of a second.
Note that in this case the current keeps growing continually, but that's because we've assumed the coil has no resistance. Real coils have a resistance $R$, and the current plateaus as it approaches the steady state of $V/R$.
You ask about a straight wire: even a straight wire has an inductance. According to this inductance calculator a 10 cm length of copper wire has an inductance of about $10^{-7}$H, so if you apply $10$ V to the wire the value of $V/L \approx 10^8$. This is around the speed at which electrical signals in copper wire propagate (i.e. a few tenths of $c$) so in this case the field will be limited partly by the inductance and partly by the rate the signals propagate through the wire.
Response to comment:
To calculate the field for a real solenoid you need to take into account the resistance of the solenoid, so the circuit would look like:

Where I've shown the internal resistance of the solenoid as a resistor in series with a pure inductor. The inductance of the solenoid is $L$ and the internal resistance is $R$.
If you turn on a voltage $V_0$ at time $t = 0$, then the current as a function of time is given by:
$$ I = \frac{V_0}{R} \left( 1 - \exp (-t \tfrac{R}{L}) \right) $$
If we consider a simple solenoid then the flux density is related to the inductance by:
$$ B = \frac{I}{nA} = \frac{V_0}{RnA} \left( 1 - \exp (-t \tfrac{R}{L}) \right) $$
where $n$ is the number of turns per unit length and $A$ is the area of the coil. This equation allows you to feed in your inductance and internal resistance and calculate how the flux density changes with time.
