You can do it in two ways:
Simple, filtering 1 record:
$query = 'SELECT * FROM tb_artistas WHERE id <> $id';
Example of the expected result of the query:
SELECT * FROM tb_artistas WHERE id <> 27
or if you bring more than 1 record, separated by commas:
$query = 'SELECT * FROM tb_artistas WHERE id NOT IN ($ids)';
Example of the expected result of the query:
SELECT * FROM tb_artistas WHERE id NOT IN (25,84,64,86)
Filtering multiple records for a more formulated search (eg with TAG):
$query = 'SELECT * FROM tb_artistas WHERE id <> $id AND tag IN (tags)';
Example of the expected result of the query:
SELECT * FROM tb_artistas WHERE id <> $id AND tag IN (2,5,8,10)