I just wanted to know that what are the major differences in 4 stroke engine or in 2 stroke engine.
The differences depend on the type of engine. You could be talking about small gasoline engines. Or you could be talking about large marine diesels for example.
For small gasoline engines, the two stroke engine is a cost and weight saving method. Since the two stroke engine has a combustion cycle twice as often, so for the same displacement, it has twice as much power. Therefore, an engine of a given power costs and weighs less. Furthermore, the reduction in moving parts results in more cost saving. For example, a two-stroke gasoline engine can work without a liquid lubrication system since it uses a special kind of fuel with oil mixed in it. It doesn't also need valves since the engine has two ports which are obscured by the piston and work like valves. All you need is one reed valve.
So it looks like a two stroke engine is very useful, lots of power for small weight and low cost. However, it requires a special kind of fuel with oil mixed in which adds to the cost and the oil is blown through, polluting the environment. Also fuel usage is very inefficient, since the fuel/air mixture can blow right through the engine without all of it burning inside the cylinder. So it pollutes and uses fuel very inefficiently. The lubrication system is probably far from ideal so a two stroke gasoline engine doesn't last as long as a good four-stroke one would.
Two strokes is mainly useful for string trimmers (although today electricity is a better choice) and chainsaws (today electricity is getting competitive here too). Slightly heavierweight engines like in generators, lawnmowers or mopeds/motorcycles almost exclusively today use four stroke engines.
However, for large engines the situation could be very different. If you have the money, you can install a direct injection system into a two stroke engine. Then the fuel is injected only when the ports/valves are closed, meaning fuel isn't blown right through anymore. This also frees the crankcase from a fuel/air mixture pump to a lubrication system. So you can have normal liquid oil used as a lubricant which no longer needs to be mixed to the fuel/air mixture.
Large marine diesels actually sometimes use two strokes. Here the strokes are twice as often, so for the same friction losses, twice as much power is generated. Minimizing friction to maximize fuel efficiency is important here.
What's a mystery to me is why cars don't use direct injection two stroke engines. They could, and it would probably work extremely well. It would allow more power for the same size/cost engine, or same power with a cheaper and smaller engine.
The only difference I know is that a 4-stroke engine goes through four stages, or two complete revolutions, to complete one power stroke. A 2-stroke engine goes through 2 stages, or one complete revolution, to complete one power stroke.
This is the main difference. However, this results in several design problems that need to be solved, and are solved differently in small gasoline engines and in large marine diesels.
I would say that although small gasoline 2-strokes and large marine 2-strokes are both 2-stroke engines, they are very different kinds of beasts. You cannot compare these to each other. Small gasoline 2-stroke is a cost and weight reduction thing, at the cost of pollution, fuel usage, short engine lifetime etc. Large marine 2-stroke is a fuel efficiency improvement thing.