Im traveling from Richmond to Atlanta to Barcelona. When do we go through customs
Normally, you will go through passport control/immigration at the airport you arrive into and then customs. Customs is pretty much a formality if you're not declaring anything.
If flying into a Schengen country, you go through passport control at your first point of entry. If you are continuing on to another Schengen country, you will go through customs there.
In your case, boh will be in Barcelona.