Upvote:1
I just found this nifty tool which allows you to compute the journey between terminals within one of several US airports.
I ran a search, landing at Newark EWR and going from terminal A to terminal C (same thing seems to apply between B and C). Here is a lik the result. It turns out there is a shuttle connecting the terminals, and yes you would have to go through security checks, which I can only assume include immigration:
Regarding your luggage, y first thought would be that you should not have to re-check it in since it is already stamped as going to SJO. However, I am afraid this might not always be the case. Rather, it depends on the airport policy. As @Gagravarr says, it is not uncommon for flights connecting through the US for the luggage to be picked-up by the passengers before crossing customs, so you might have to re-check it in.
As a general piece of advice when travelling on connecting flights involving terminal changes, make sure you have enough time between the flights, to allow the luggage to be transferred from one plane to the other.