$query = sprintf("SELECT * FROM users WHERE user=%s AND password=%s",
quote_smart($POST['username']),
quote_smart($POST['password']));
They are arguments for the sprintf() function. They dictate where the values passed to sprintf() get inserted.
Simple example:
$myname = "Johnny";
$myphone = "1234567";
$message = sprintf("My name is %s and you can get me on $s", $myname, $myphone);
$message reads: My name is Johnny and you can get me on 1234567