What happens when i don't use an airlock properly?!
Nothing, I have made wine for years and never even use them. Just rubber band a plastic bag over the opening.
People made alcohol forever without all this fancy stuff...
Assuming that you had liquid in the airlock, then leaving the cap off is not a big deal. The liquid is the actual barrier, not the cap.
The fact that something came out of the airlock is more of an issue. It sounds as though there was not enough head space in your fermenter. You need to leave approximately 20% of the fermenter empty (i.e., If you are using a 6.5 G carboy, you ferment more than about 5.25 G of beer.)
When fermenting beer, we're attempting to create the best environment we can for the yeast to grow and prosper. Unfortunately, other wild beasties like this environment too. Each step, is meant to maximize the yeast and minimize the wild crap. If you have good sanitation as a part of your process you should be fine.