Accidentally means happening or done without planning or intention.
When we use "accidentally", it usually means something unexpected happened, and it's not like we meant for it to happen. For example, if you spill coffee on your shirt while getting ready for work, that's an accident. Or maybe you deleted a very important document by mistake - again, an accident. It can also be used with people, so if someone hurts themselves or gets hurt because of something that happened unexpectedly, we might say it was accidental too.
In an accidental manner; by chance, unexpectedly.
Example: He discovered penicillin largely accidentally.
