The difficulty of the POW is also called the minimal weight magnitude. It's up to you to choose this threshold (it's possible in wallet UI). High minimal weight magnitude means longer computation time, but you must be aware of few things when selecting the minimal weight magnitude :
- today, on the main net : nodes running the default IRI implementation will reject all transactions with weight magnitude < 14
- choosing high weight magnitude increase average time to attach the transaction and consequently decrease the probability to be selected as a tip by incoming transactions
Note that duration of the pow can be very short if you are lucky:
To do the POW, a computer must generate a random set of chars called "nonce". Then compute a "hash" for your transaction with that "nonce". If the hash ends with 14 (i.e. min weight magnitude) trailing zeros : then the nonce is good and POW is done. If the hash don't ends with 14 trailing zeros : the computer generate a new random "nonce" and try again. The computer must try, and re-try, and re-re-try ... until a valid hash is found.
The hash function is particular in the sense that there is no way to predict it's outcome: one single bit inverted in the nonce will completely change the resulting hash in an unpredictable way.
Regarding the minimal level of magnitude required to be accepted on the tangle: this minimum is currently, by default, 14 on the main net (and 13 on the test net). This default value is in IRI source code and can be easily changed by full node owners (but I think most of them won't change it).
This default value is increased to reduce the spam on the network: a higher value discourage spam, but make more difficult for honest nodes to submit a transaction. Iota devs may decide one day to reduce this value if spam became less problematic.