To be pessimistic is the total and absolute opposite of optimistic. Therefore the definition of pessimism is anti optimism.
An example of pessimism is where the pessimist is going to get his car fixed, in a pessimistic view point, he/she may think the car workers are liars who are just going to take a lot of money from them.
Another example of pessimism is when a pessimist receives a gift, he/she might become suspicious of why this has been done and try to say no to the gift.
Hope i helped!