Many synapses have neurotransmitter receptors that are a type of ligand-gated ion channel. Unlike the leak channels, these channels are gated, meaning that they only allow ions to pass when their ligand, which is a neurotransmitter, is bound to the receptor.
The graded potential produced by neurotransmitter binding to these receptors depends on which ions are allows to pass (some allow only one type of ion to pass and some allow multiple types of ions to pass), how many channels are opened (which depends on the amount of neurotransmitter in the synapse), and how long the channels stay open (which depends on how long neurotransmitter remains in the synapse). If a channel opens that is selective for only one type of ion, the membrane permeability for that ion is increased, which causes the potential of the membrane around the channel to move toward the equilibrium potential of that ion. Depolarization usually occurs if sodium or calcium channels open, because both their electrical and diffusion forces drive them into the neuron. Hyperpolarization usually occurs if chloride channels open, because for most neurons its larger diffusion force drives it into the neuron against its smaller electrical force. Hyperpolarization also usually occurs if potassium channels open, because its larger diffusion force drives it out of the neuron against its smaller electrical force.
When a sodium channel opens, sodium flows inside the neuron, causing a small area of increased concentration of positively charged sodium ions on the inside of the membrane around the open channel, depolarizing this area of the membrane. When the channel closes the small area of increased sodium concentration inside the membrane rapidly dissipates into the rest of the cytoplasm because electrical and diffusion forces drive the sodium ions away from each other to spread out and mix in with the rest of the cytoplasm. The cytoplasm has an enormous total number of sodium ions compared to the much smaller number that enter through the channel. This dissipation continues until all the sodium ions are as far apart from each other as possible as they reach equilibrium. Imagine this as a small hemisphere of increased sodium concentration on the inside of the membrane centered on the open channel. This hemisphere rapidly expands in all directions away from the channel on the inside of the membrane, weakening as it expands until it eventually fades away entirely as the sodium equilibrates with the sodium in the rest of the cytoplasm. As the hemisphere expands a wave of depolarization spreads across the membrane in all directions away from the channel, weakening as it travels. This is why graded potentials decay with time and distance, so that their effects are only additive if they occur close enough together in time and space.
The most common cause of excitatory graded potentials in neurons is entry of sodium, but the mechanism is the same for calcium. The most common cause of inhibitory graded potentials in neurons is entry of chloride. The mechanism of this is the same as for entry of sodium or calcium, but because chloride is an anion it hyperpolarizes the membrane. Inhibitory graded potentials may also occur by exit of potassium. The mechanism of this is the same, except that the expanding and weakening hemisphere of increased potassium concentration is on the outside of the membrane, causing hyperpolarization.