Can't select 2 tables at the same time
If I understand your specifications well, and although I haven't tested this query in the server yet, it should work:

SELECT CO.conDat, 
       PA.pesNome                         AS paciente, 
       ME.pesNome                         AS medico,
       COALESCE(CO.conDiag, 'indefinido') AS condiag
    FROM  consultas    CO
    INNER JOIN pessoas PA 
    ON    PA.pesId   = CO.pacId
    INNER JOIN pessoas ME
    ON    ME.pesId   = CO.medId;


Since this query JOINS the table consultas with pessoas twice in order to retrieve the pessoas.pesNome column values related to medicos and pacientes respectively, it is important that you look with special attention to the aliases given to the PA.pesNome and ME.pesNome columns (by way of the AS keyword in the SELECT statement), because such aliases are used for the purpose of displaying different column headers in the obtained result set, and thus, ambiguities are avoided, since the meaning of each column, paciente or medico, is clear.

For handling the cases when consultas.conDiag contains NULL, the above query takes advantage of the COALESCE() function which, in this particular case, substitutes NULL values in said column with your custom defined string ‘indefinido’.

Alternately, you can try this other query, which shows a different method for replacing the consultas.conDiag column value when it holds NULL, via the IFNULL() function:

SELECT CO.conDat, 
       PA.pesNome                       AS paciente, 
       ME.pesNome                       AS medico,
       IFNULL(CO.conDiag, 'indefinido') AS conDiag 
    FROM  consultas    CO
    INNER JOIN pessoas PA 
    ON    PA.pesId   = CO.pacId
    INNER JOIN pessoas ME
    ON    ME.pesId   = CO.medId;