sodium chloride is made up of sodium and chlorine.
sodium chlorine would form an ionic bond, which is the transfer of electrons
because sodium is in group 1, it has 1 electron on its outermost shell
because chlorine is in group 7, it has 7 electrons on the outermost shell.
sodium and chlorine both want a full outer shell. therefore, sodium and chlorine will form an ionic bond, and sodium will transfer its one electron to chlorine so that it can lose its electron and get a full outer shell, and chlorine can gain an electron and also get a full outer shell. this can be represented using the dot and cross model. as shown in the picture.
but don't forget to add a 1- charge to chlorine with brackets and a 1+ charge to sodium, also with brackets.
hope this helped.. I know it became really long but I didn't really realise it once I was half way.. anyway, if you have any questions just ask :)