Drupal 8
Use the entity query class.
$query = \Drupal::entityTypeManager()->getStorage('entity_type')->getQuery();
$query->condition('field/property', [1, 2, 3], 'IN');
$ids = $query->execute();
To directly query the entity database table, the code is essentially the same for other database tables.
$query = \Drupal::database()->select('table', 't');
$query->condition('column', [1, 2, 3], 'IN');
...
Drupal 7
See Berdir's answer.
Drupal 6
You can use code similar to the following one.
$nids = array(1, 2, 3);
$placeholders = db_placeholders($nids);
$result = db_query("SELECT * FROM {node} WHERE nid IN ($placeholders)", $nids);
db_placeholders()
is needed in Drupal 6 to create the string that holds the values needed for the array. Drupal 7 handles all this internally as Berdir describes.