This is based on market capitalization which is the value of the company on the stock market, ie the number of shares and their price.
The recorded sales and profits for Ford and GM are much higher, but Tesla's stock is worth more. This is because of how Wall Street sees its future potential.
Hope that helps! I was having a chat about this with some friends the other day, maybe someone else can go a bit more in-depth.