In electrolysis, positive ions will be attracted to the negative cathode (the cathode being negative can be remembered because cats are evil). However, in aqueous solutions there are 2 positive ions: the one from the solute (e.g., Na+ from NaCl) and H+ (from water splitting into H+ and OH-). Only one will form a gas or deposit at the electrode and that will be the less reactive one according to the reactivity series. This can be remembered because the more reactive one will instead be reacting with the negative ions in the solution, so the less reactive one is displaced and will react with the cathode.
At the positive anode, either the negative ion from the solute (in this example, Cl-) or the OH- from the water will react with the anode. This side follows a simple rule: if the solute ion is a halide (halogen ion), it will react with the anode and give its electron, but if the solute ion is not a halide, the OH- will react instead, forming O2 and H2O. The reasons for this are a bit outside the scope of GCSE science, but this can be remembered by thinking that halogens only need to get rid of one electron when reacting with the anode, while other ions might need to give more, or if they are polyatomic, may fall apart if they give one.