Direct discrimination is the legal term that applies if you treated less favourably than someone else has been treated (or would be treated) because you belong to one of the protected groups.
You can be an employee or even a prospective employee and you need to be less favourably treated because of your race, sex, marital status (including civil partnerships), religion, sexual orientation, gender reassignment, age, disability, pregnancy or maternity.
This type of discrimination tends to be obvious, for example, a female candidate with the best qualifications and experience does not get an interview, but a male candidate with fewer qualifications does.
Or, if you are already in a job, you are ignored for promotion, the job going to a less qualified male worker.
This happens when, because of your sex, someone treats you worse than someone of the opposite sex who is in a similar situation.
Sex discrimination could include:
not hiring a woman because the boss thinks she won’t fit into a traditionally male workplace
offering women and men different rates of pay or benefits for the same job
not promoting a woman to a more senior position because it’s assumed the other staff won’t respect her authority
dividing up work tasks based on whether staff are male or female
insisting women wear different clothing at work to men, for example, short skirts
not considering women for a particular role.
Please be very clear, sex discrimination can occur against men just as much as women.