Ok I see. So basically there is a set time for the each course and you have to complete the run in that time or less?
At the most basic level, yes, that is correct.
So you don't have to be the fastest dog to get a Q? you just have to complete the course in the set time frame?
Correct, you can Q and not place 1st, 2nd, 3rd, or 4th. You would see this happen at larger trials. (The reverse is also true - you can place but not Q.)
In SOME venues, and at some of the higher levels of competition, you need Wins (1st place) as well as Q's in order to work toward a title. (For example - in TDAA, in order to receive the TAM (Teacup Master Agility Dog) or TMAG (Teacup Master Agility Games Dog) titles you need 10 Qs and at least 3 of those need to be 1st place finishes. Completing both TAM and TMAG earns you the TACh (Teacup Agility Champion) title.
Do they award a 1st, 2nd or 3rd place for fastest times?
As you can see from directly above, yes, they do award a 1st through 4th place - at least in the venues I compete in. I can't speak for those I don't participate in.
In some cases, in order to earn a title, you need wins, 1st place finish, in conjunction with a Q. (You don't want a Champion dog who can't finish in 1st place within his class basically.)
Awards (Q's and placements) are given for each jump height within a class. That means you'll have a 1st - 4th place dog for, using Teacup for example, 4, 8, 12, and 16 inch dogs for each class. (A class is a Standard run or a Game.)