your code is fine but to order do the following:
require "conexion.php"; You must know all the connection parameters including the error so the following code should append them to the file
$conexion = new mysqli($host,$user,$pass,$baseDatos);
if($conexion->connect_errno)
{
echo "Error de conexion de la base datos".$conexion->connect_error;
exit();
}
also how do I mention To Cedano for questions of querys optimization you must add the fields to the selection
select idMedico,medIdentificacion,medNombres,medApellidos,medEspecialidad,medTelefono,medCorreo from medicos
With respect to the table I would do it this way, as I explained in the comment
<tr>
<td><?=$datos["idMedico"]?></td>
<td><?=$datos["medIdentificacion"]?></td>
<td><?=$datos["medNombres"]?></td>
<td><?=$datos["medApellidos"]?></td>
<td><?=$datos["medEspecialidad"]?></td>
<td><?=$datos["medTelefono"]?></td>
<td><?=$datos["medCorreo"]?></td>
</tr>