In Rutherford's gold foil experiment, the particles of which most passed straight through the gold foil were alpha particles, which are positively charged. The few alpha particles that were deflected back or to one side were being repelled by nuclei, which are also positively charged. Those that passes straight through did so because they didn't encounter any nuclei.
The observation that most alpha particles passed straight through the gold foil led Rutherford to conclude that the the positive charge in an atom in concentrated in a very small area, the nucleus. Atoms are mostly empty space. Electrons, which are negatively charged, are distributed throughout this space but take up a very small part of it.
Rutherford's finding advanced the model of the atom from the plum pudding model in which the atom was a sphere of positive charge with electrons scattered throughout to the first nuclear model.