Your questions are good. Go for sky_khan's approach for now. He removed the "with", and that makes it easier for someone who is new to understand the code. SQLdb always need a connection and a TSQLTransaction. I erroneously took for granted you had them ready for use.
PopulateListView is a procedure I added to the TForm1 class. (You can add any routines you need under the private and public section in the class interface). Sky_khan again simplified it for you and put all the code in a buttons eventhandler so you just have to double click the button and paste your code.
Otherwise you should have added PopulateListView like this:
TForm1 = class(TForm)
//...
private
procedure PopulateListView;
public
end;
After that you press CTRL+SHIFT+C to generate the procedure in the implementation section, and add your code there.
implementation
procedure TForm1.PopulateListView;
begin
//Add your code here..
end;
The Lazarus WIKI has a lot about databases, a place to start:
http://wiki.lazarus.freepascal.org/SQLdb_Tutorial1