Can anybody help me with schematic or links for effective design of an SMPS unit which takes 230v AC and outputs 12 v dc with 2A .... i want to understand how it works how a optocoupler work in that SMPS unit??
The principles in a 2A design are similar for those from say hundreds of mA to 20A+. Very low or very high currents may lead to more specialist designs.
You will find many examples here and can judge from the circuits if they look like what you are looking for.
The LT4430 is made as an optocoupler driver for this purpose and this application note provides many pages of discussion of how an optocoupler is used in this application. Application of an optocoupler driver is described in the application note below. Note that the example circuit is a complicated one as far as power transfer goes but the application note is a good one as it deals withy the actual optocoupler aspects more thoroughly than most app notes do.
This LT1105 design is unusual in that it specifically aims NOT to use an optocoupler. Comparing this to the examples in the above application note should provide good contrasts.