@khattak
Rotary and Wankel Rotary are same things, but if you say just rotary than it could be the one mentioned by Racerf1 in his post used in planes. The rotary combustion engine must not be confused with "rotary" aircraft engines which are piston cylinders arranged in a circle. The whole engine rotates. They came into vogue in the first World War.
The wankel RCE (Rotary Combustion Engines) are mostly used in RX series of Mazda. Mercedes Benz also used 3 rotor in their famed C111 (1969) and 4 rotor in (1970). The 2.4 ltr four-rotor developed as much as 400 horsepower with variable length intake and ABS by that time. Although it was developed with 400bhp but when tuned for 350hp it did 0 to 60 mph in under 4.8 seconds, imagine the 400bhp!
=======================================
Another interesting fact, why they call it Wankel RCE?
Well, Felix Wankel conceived the idea of a rotary engine in 1924, in 1927 he made drawings of the shape of RCE and received his first patent in 1929.
======================================
Now the idea behind Wankel RCE!
The RCE has four phases in it's combustion cycle which means it is an Otto Cycle engine. They are intake, compression, power, and exhaust.
Unlike the conventional piston engine, the fuel air mixture is swept along, so the four phases take place in different areas of the engine.
There are two type of Wankel RCE's
KKM - Kreiskolbenmotor or planetary rotation motor (PLM), distinguished by one stationary peripheral housing. The rotor moves in an orbit and propels an eccentric shaft. This is easier to manufacture, cool, and maintain than DKM. Intake and exhaust passages are better. Better cooling is achievable. It is more compact. Modern rotaries are KKM types.
DKM - Drehkolben Maschine or single-rotation engine (SIM), the first RCE, has the distinctive feature of an inner rotating housing and rotor moving in circular motion around a fixed central shaft. This requires disassembling the motor to change spark plugs (three), perhaps the main reason it was discarded. However, DKM is the smoothest of the two, and high rates beyond 25,000 rpm are possible. Bearing loads are lighter.


=======================================
Now lets go the type and history of Rotary Engines, not Wankel RCE!
There are three main types of true rotary engines:
1) Wankel types based on eccentric rotors.
2) Scissor action types using vanes or pistons.
3) Revolving block types ('cat and mouse' type). Engines are closely related to pumps and compressors: the former drives and the latter is driven.
Designs for rotary engines were proposed as early as 1588 by Ramelli, though it took the development of the Otto cycle engine in 1876 and the advent of the automobile in 1896 to set the stage for a proper rotary combustion engine. Furthermore, it took Felix Wankel to catalogue and organize 862 configuration pairs, of which 278 are impractical. Wankel investigated 149. Prior to 1910, more than 2000 patents for rotary pistons were filed.
Other early designs were made by Huygens in 1673 and Kepler. James Watt made a rotary piston steam engine in 1759, as did Ericsson. The American John Cooley made an invention of a sort of reverse Wankel in 1903 (see image), which Umpleby applied to internal combustion in 1908, but never developed successfully. Some people report that Elwood Haynes invented one in 1893, but I think they are confusing it with his invention of a "rotary valve gas engine" in 1903. Frenchman Sensaud de Lavaud obtained a patent for a four phase rotary piston engine in 1938, two years after Felix Wankel. There were also designs by Pappenheim, Hornblower, Murdoch, Bramah, Flint, Poole, Wright, Marriott, Trotter, Galloway, Parsons, Roots, Wallinder, Skoog, Baylin, Larsen, Ljungström, Behrens, Maillard, and Jernaes. Marsh has made a good summary with diagrams.

====================================
I hope it helps understand the concept of it!