Just happened to me too.
In my case, I triggered a religious victory for another player.
To explain, a religious victory requires all other civilizations to have more than 50% of your religion. Everyone had been "converted" except this last civilization. When I took their last city, the condition that all civilizations be "converted" came true.
tl;dr: you get the base resource, but the resource doesn't count as being "improved" in any way.
As a Stack Overflow user, my first thought is to check the documentation. (Yes, there is a manual.) According to page 48:
To utilize a resource, it first must be within your civilization’s borders, and then you must construct the appropriate "improvement" in that hex, or found a city on top of it.
(emphasis mine)
It's not clear whether the city gets the additional improvement bonuses, such as counting for adjacency purposes.
That didn't satisfy me, so I ran some tests.
I found a spot with a mine-able resource (niter, base 3 food/1 production) next to empty regular grassland (just 2 food). After I built the city on the niter, I saw niter appear in my nation's list of available resources, but the tile continued to produce the same 3F/1P. When I reloaded and built the city on the grassland, then built a mine on the niter, it started to produce 3F/4P instead. Conclusion: cities do not count as resource improvements (i.e. mines, pastures, &c.)
To test adjacency, I placed a farm immediately to the right of the grassland city, which was a rice grassland hex. Its base value was 3F, and the farm boosted its production to 4F. Then I started another playthrough where the city was not adjacent to either hex, and placed farms on both hexes. The production went from base 2F/3F to 4F/5F after the farms were built. Conclusion: cities do not grant resource adjacency bonuses (which really isn't a surprise since we already know they don't count as resource improvements in the first place).
I did this with a game starting in the Information Age (just so I would have the farm adjacency bonus available for testing) and the leader Catherine de Medici of France (because she doesn't have any special abilities that would interfere with these tests).
Side note: when I put the city on the regular grassland hex, the hex gained an extra unit of production. Based on the available evidence, I don't think this has anything to do with resources; I speculate that it's the game's way of making sure that no city starts with 0 production (and ends up in a sad, perpetual state of never being able to build anything at all).
EDIT:
Hey, I have points now, so I can include the screenshots I took. You can see the city doesn't improve the niter yield at all, nor does it provide/receive an adjacency bonus to/from the farm.
Best Answer
Damaged Buildings: Whenever you capture a city, some buildings may become damaged and in need of repair. They are not something you can pillage before hand and it is just a mechanic of capturing cities. (This is a change from Civ V where buildings would just be gone and not destroyed).
Advantages/Disadvantages to pillaging: (Assuming you conquer the city eventually)
Advantages: You earn resources based off what it is. Improvements heal your units and yield some gold (This is the most common pillaging tactic dating back many Civ games). Districts yield a small amount of whatever it is that they produce. Ex: Pillaging a campus yields science whereas a theater district grants culture.
Disadvantages: When you pillage improvements your newly conquered city may be slow to get back on it's feet until your builders can fix it up. Conquered cities with pillaged districts seem to be less worth it because they do not produce anything while destroyed. They often take much longer (dependent on your hammers) to repair, and compared to the time it takes vs the amount you gain when pillaging, it is not worth it.
Notes: It is more worth pillaging districts to cripple an opponent if you will not be conquering the city soon. If you intend to raze the city, definitely pillage any and all because they won't matter without a city there.