The word whatever can be used in several different ways.
It can be used as a relative pronoun. In this case it introduces a relative clause. As a relative pronoun, whatever can be the subject, object or complement of another clause.
You can take whatever you like.
You can do whatever you want.
Whatever can also be used as a determiner. In this case it is followed by a noun.
We will be ready at whatever time you arrive.
You can use whatever to start a question.
Whatever do you mean by that? (More emphatic than ‘What do you mean by that?’)
When used as a conjunction whatever connects two clauses.
We will stay united whatever happens.
Whatever means ‘it doesn’t matter what…’
Whatever happens keep calm.
Now that you are free you can do whatever you want.
You are free to spend the money on whatever you like.
Whatever happened between us is none of your business.
In spoken English, whatever is used for saying that you do not mind which thing is chosen.
‘What would you like to drink – coffee or tea?’ ‘Oh, I don’t mind. Whatever.’
The expression whatever is sometimes used as an emphatic form of ‘what’. This structure is commonly used to show that you are surprised, annoyed or upset.
Whatever are you doing there? (More emphatic than ‘What are you doing there?’)
This expression is sometimes written as ‘what ever’.
What ever did you do with that 100 dollars I lent you? (= What did you do with that 100 dollars I lent you?)