They are both used before countable nouns and uncountable nouns: and we always use "of" before nouns.
Example Sentences with Uncountable Nouns:
I like to drink a lot of coffee.
There is lots of traffic in Istanbul.
A lot of the pollution in our water comes from pesticides used in agriculture.
He contributes a lot of time and money to helping poor people.
You should drink lots of water while you are playing sports
There is a lot of work.
He has lots of problems.
There are a lot of cars in the car park.
I want lots of apples.
We bought lots of ammo for our paintball game next weekend.
Life is a bumpy road with lots of ups and downs.