I am confused about voltage polarity and current direction in transformers , for example the equivalent circuit of the ideal transformer in figure(a) the instantaneous voltage polarity of the secondary is positive at the dot terminal,if we connect a load across the seconday terminal, isn't supposed that the current goes out from the dot to the load? or does that mean that the voltage and current of the secondary side are 180 degree out of phase?
Note that in case (a) the ratio of the currents is negative while in (b) it is positive but the secondary current arrows are reversed. They both, effectively, say the same thing.
I've never seen it expressed as in (a) but I can see that it may make some sense to present an ideal transformer with current in from both sides as neither side is then assumed to be "input" or "output" but both can be inputs, etc.
(b) is the normal way of thinking in most electronics applications. You may find that (a) has its uses in electrical utility grid transformers where power can flow either direction to suit generation / demand requirements.
(c) and (d) should be fairly obvious inversions of (a) and (b) respectively.
The way you phrased the question is a bit confusing, so I'll just state how I think about the dot convention rule:
The voltage waveform on a dotted terminal is always in phase the voltage on another dotted terminal.
This is true only when comparing voltages to voltages - don't bring current into the mix. The phase relationship between voltage and current will depend on what else is attached to the transformer.
Also note that the instantaneous voltage is irrelevant - transformers only respond to time-varying voltages and currents, so it's best to think of any signal as a sine wave, not a voltage at a particular moment. If you need to focus on a particular moment, use dV/dt or di/dt.