Well,sub are subtitles,usually written in different languages that appear at the bottom of the episode.It's so viewers can watch it in Japanese and read in in their language and understand it(Example:English subs,French subs,Russian subs,etc.)
And dub is in English with different voice actors.o3o
Well subs is where there english (or any other language) subtitles on the bottom/top of the anime episode,where the characters are still speaking in Japanese,but the subs are sort of like translating what they characters saying,and Dubs are where a dubbing company tapes over the Japanese voices and turns them into (English/French/Spanish etc.),dubs are pretty much the taping over the original voices and giving the characters voices in another language but also the dubbing company could make some major changes (like in certain backgrounds or characters names,obviously the scripts and some scenes as well) here's an example below the picture (that's in Japanese) says "Shigeru is the best,Satoshi is an Idiot" while In the dub it was changed to "Gary was here,Ash is a Loser!" and notice they took out Shigeru sticking his tongue out! anyway hope I helped in some way!