You earn Credits/Tokens by racing in Career Mode, Events and Multiplayer. Note that the number of Credits/Tokens won depends on your position and also, in Career Mode, on the number of Flags earned. Achieving a Milestone in an Event or with your Club is another good way of earning Credits/Tokens.