The Leaverbuster FAQ should answer most of the questions you have about the system.
When you first AFK, the system gives a little pop-up that tells you not to AFK.
After that, there are a couple more games of leniency built in.
When you show AFKing being a habit, you get Low Priority Queue. That's the wait before joining the queue. LPQ always lasts 5 games. It starts at 5 minutes, but it can increase up to 20 minutes if the AFK habit continues.
To give you an idea as to what is considered a habit, leaving 1/100 games will quickly lead to 20 minute LPQ.
AFK is an acronym of Away From Keyboard, but physically remaining at your keyboard isn't what AFK specifically is talking about here.
Any and all DCs (disconnections) lasting more than 3ish minutes will count as AFK.
The system has specifically been claimed to be able to detect and punish: sitting in fountain, wandering around using skills, AFK farming the jungle while not assisting your team, and AFK pushing waves while not assisting your team