TL;DR Bigger numbers are better.
Here's a quickish run down of the naming schemes of the 2 companies.
Nvidia:
Geforce means it's a gaming GPU
GTX means it's in the upper half of performance, GT are the lower power cards.
All of the modern cards have 3 numbers.
First number is the series, most recently is the 700 series. Higher is newer.
2nd number is the tier within series. Typically 8 is the most powerful single GPU card with 9 reserved for dual GPU cards.
3rd number is mostly a 0, but sometimes a 5. It means it's between the 2 tiers.
Sometimes there is a "Ti" on the end. This means that it is a more powerful version of that tier's card - but less powerful than the next tier up. (eg GTX 660 Ti is more powerful than GTX 660 but not as powerful at GTX 670)
For example: Nvidia Geforce GTX 650 Ti. Geforce means it's a gaming card, GTX means it's from the top half of the tier. 6 means it's the 600 series (fairly new), 5 means it is a fairly middle of the road card in that series. 0 means nothing and the Ti means it's more powerful that a GTX 650 but not as powerful as a GTX 660.
A quick rule of thumb is that by cards where the sum of the first 2 numbers is the same are of equal power. This is not always the case but gives a rough idea. Eg. 570 ~ 660, 680 ~ 770.
AMD:
I don't know as much about AMD cards but I can tell you a few things.
For cards named "Radeon HD XXXX" the first number (denoted X) is the series and the other 3 numbers represent the tier within that series. Higher series numbers mean newer, higher tier numbers mean more powerful.
For cards named "Radeon RX 2XX" the first number after the R is either a 7 or 9. 7 is lower tiers, 9 is upper. The XX after the 2 represent the tier within the series (they are all 2 series at the moment) and higher is more powerful. Sometimes there is an X after the numbers, this means that it is in between tiers. The RX 2XX cards are AMD's newest cards, and for comparison most of them are identical to the 7XXX series with only a name change.
For example: HD 7970. The first 7 means 7000 series, and the 970 means it is very powerful tier card within the series. it also happens to be exactly the same as an R9 280x.
Hope this helps somewhat with understand Graphics card rankings!