Use 'both' to talk about two things or people at the same time. It means you mean the two together, not just one.
Both cats are sleeping now.
I like both apples and oranges.
'Both' can replace two things or people in a sentence. It means these two things or people together.
Both are ready to go.
Do you want both of these?
Use 'both' as an adverb to say two people or things do the same action or feel the same way.
She sings well and I both dance well.
They both want to eat now.
'Both ... and' connects two related things, showing they are included together.
She likes both pizza and pasta.
Both the teacher and students were happy.
'Both' can show that two feelings or qualities exist in one thing or person at the same time.
She felt both happy and sad about the news.
The movie is both funny and serious.
In logic, 'both' means two conditions or statements are true together at the same time.
Both A and B must be true.
The solution works for both x and y.
In older or dialect English, 'both' can be a noun meaning two people together, but this is rare today.
The both of them arrived early.
I saw the both of the lads at school.
'Both' can add emphasis to show that two persons or groups together are involved or act as one.
Both men agreed to the terms.
Both sides want peace.