The easiest way to do this is to boil water and pour the water in the container and let it sit. You can also submerge the container in boiling water.
The other easiest way is to run container through a dishwasher. But if you don’t have a dishwasher…refer to option 1.
This is useful for when you need to store something in a sterile container, like a jam, a vinegar, a new hot sauce, etc. It protects from cross-contamination and helps the food store longer.