The user can't directly access the h/w so there is something called kernel in OS which have direct access to h/w and the shell is something which passes the command to kernel and kernel interects with H/w.

Shell acts as command interpreter i.e it converts the command which is in high level lang i.e ( like ls, date ) into bits and bytes and passes to the kernel which inturns give the results in bits or bytes(low level or m/c level) and passes to shell which in turns converts to high level and display to user