Austria blamed a Serbian rebel and by extension Serbia and gave them an "ultimatum" ( to search for the culprit in their land) (frankly, it was an extreme ultimatum with Austria demanding power that could threaten Serbia's independence. )
Serbia found it too much and asked Russia (with whom it had an alliance) for help. Russia agreed.
And so Russia, Germany and half of Europe was at war.