Alright so just for the modern cards.
R9 270X = GTX 950
R9 380 = GTX 960
R9 390 = GTX 970
R9 Fury = GTX 980
R9 Fury X = GTX 980 Ti.
The "X" versions (e.g. R9 380X) are between the non-X version and the next non-X in line (R9 380X is between R9 380 and 390 in performance).
The Rx 300-series are basically a rebrand of the Rx 200-series (slightly improved thermals and extra VRAM on some cards). Some of the Rx 200 cards didn't get a successor however, like the R9 270 (the R7 370 is a rebrand R7 265).
Additionally, the Rx 200 series is itself again mostly a refresh of the HD 7000 series, although I won't go into detail as the naming of the HD 7000 series is a bit complicated and largely irrelevant now.
AMD will probably keep this naming scheme up with their new cards (Polaris and Vega), although it is unknown if they will make "X" versions of their cards.
As for generation, you differentiate them by the first number of the card number (e.g. R9 280, R9 380, R9 480). The HD series are differentiated by the first number as well (e.g. HD 5000-series, HD 6000-series, HD 7000-series).