Electric charge is just a measure of the strength of a particle's interaction with the electromagnetic field (i.e., photons). Particles don't obtain a charge from the the field. Saying that a particle has a given charge is the same as saying it interacts with the electromagnetic field with a certain strength. Just a shorthand way of saying it.
The overall sign and scale of charge is a convention but once you fix one, say the charge of the electron = -1, all of the others are fixed by comparing their relative strengths and knowing that "like charges repel, opposite charges attract."
Antiparticles always have the opposite sign charge as the corresponding particles. The rule is very simple, but the reason for the rule is fairly subtle, having to do with combining relativity with quantum mechanics and causality.
The reason why quarks have fractional charges 2/3 and -1/3 relative to the electron (edit: actually positron - that sign convention again) is presently unknown, although for complicated reasons (quantum field theory anomaly cancellation) it turns out to be necessary for the consistency of the Standard Model. In unified field theories these charge relationships are a fundamental feature of the theory, generally required at a deep level by the structure of the symmetries at very high energies, but so far none of these models has experimental support.