Problem with the 3D cursor

I keep doing something that I don’t know now and then which makes the 3D cursor not follow my objects so I when start for example scaling them, my objects won’t stay still and get bigger but they move towards the cursor.

Here’s an example pic:

How do I fix this?

Change your pivot to something other than 3D cursor. The selection is available in the 3D viewport header.

Thank you very much!