Usually in these types of problems (if you want an analytical solution) you keep two ends of the bar at fixed temperatures and it is assumed that other methods of heat loss are not present (convection or radiation form the bar).
The temperature distribution depends on the fixed temperatures at the ends and the conductivity of the material.
The steady state is not attained instantaneously. The heat is transferred slowly and the transfer rate depends on the thermal conductivity.
If you take a section of the bar and the influx from one surface is equal to heat out-flux from other surface (in a time interval dt), which in turn equal to the total heat flow through the bar (in same time interval) the bar is said to be in steady state. In this condition temperature distribution along the bar will not change with time.
If bar is not in steady state the temperature along the bar will change with time and you have to use heat equation to calculate the temperature variation with time.
Usually this can be employed to 1D problems analytically (I am not sure if all the 1D problems can be solved analytically), to solve the real world 2D or 3D situations people usually use Finite element methods to get the transient and steady state solutions.
I hope this will help
regards,