Lets say I have the ID of an image. Is there a way that I get all the posts that have that image as their featured image?
The featured image is stored as post meta with the key
_thumbnail_id, so you could use a meta query to get posts with a specific thumbnail:
$posts = new WP_Query( array( 'meta_query' => array( array( 'key' => '_thumbnail_id', 'value' => $attachment_id, ), ), ) );
$attachment_id is the ID of the image.