have something done

The passive voice is used when the subject of a sentence is the person or thing affected by the action of the sentence.

Look at the picture above. "She is having her hair cut." (Sensible.)

The passive voice may use any tense of the verb to be:-

to be
past participle
is / are / am

was / were
(present simple)

(past simple)
finished The cakes are / were all finished.
is being / are being /am being

was being / were being
(present continuous)

(past continuous)
washed The floor is / was being washed.
has been / have been

had been
(present perfect)

(past perfect)
sent The parcels have / had been sent.
will be (future) cleaned The office will be cleaned.

We particularly use the passive voice when we don't know or aren't bothered exactly who has done something. This is called passive without agent where the recipient of the action becomes the subject.

For example:

"The crime scene had been cleaned." (What had been cleaned? - The crime scene = the subject)

We often use the passive to report what someone has said, but we want to avoid telling anyone who said it.

For example:

"I was told you weren't coming."

Sometimes it is used in order to deliberately avoid saying who did something, or more often who's to blame for something. Either because you don't know, or because you don't want to say. You'll often see it used in politics, the business world, or in any other activity involving bureaucracy.

For example:

"The civilian was shot." (Who was shot? The civilian=the subject)

"The report was mislaid." (What was mislaid? The report =the subject)

Sometimes you may want to use the passive voice but wish to mention who carried out the action. This is called passive with agent and the agent is usually introduced with the word by.

For example:

"The office was cleaned by Mrs Smith."

Or you may use a subject such as people, someone, they etc, when you don't know who the agent is.

For example:

"The car was stolen by joyriders."

Be warned though, if misused the passive voice can sound pompous or evasive.

As Geoffrey K. Pullum said in his article 50 Years of Stupid Grammar Advice:  "The passive is always a stylistic train wreck when the subject refers to something newer and less established in the discourse than the agent (the noun phrase that follows 'by'".

When you can't use the passive

Intransitive verbs cannot be used in the passive. This is because they cannot have objects, and so there is nothing to become the subject of the passive sentence. For example with verbs like die or arrive.