Here are some options, from best to worst:
* A clean, tightly fitting rag or cloth: Stuff it firmly into the opening. Secure it with a rubber band if possible. This is better than nothing and relatively easy to implement. However, it's not ideal for high speeds or extreme temperatures.
* A piece of plastic sheeting (e.g., from a plastic bag): Similar to the rag, but might be slightly less absorbent. Again, secure it if possible.
* A properly sized cork: If you happen to have one on hand and it fits snugly, this could work.
* Aluminum foil: As a last resort, tightly crumpled foil can provide a temporary seal. This is least preferable as it's likely to be less effective.
Important Considerations:
* Driving: Keep your speed moderate and avoid pushing the engine hard. The temporary seal might not withstand high RPMs or pressure.
* Distance: Only drive the shortest possible distance to get the necessary replacement.
* Oil Level: Check your oil level frequently. Even with a temporary seal, some oil loss is possible.
Do not use: Anything that could melt, degrade, or contaminate the engine oil. Avoid anything that might be sucked into the engine.
Get a replacement oil cap as soon as you can. Your car's manual will usually have the correct part number. Auto parts stores will have replacements readily available.