The 12MP designation is usually used to refer to still photography while the 1080p designation refers to video.
The sensor has 12 megapixels - sometimes a little more which gets masked out. This means it takes 12 megapixel photos. Most likely this is a 4:3 aspect-ratio image which means about 4000x3000px.
Video is a stream of images, most commonly captured from 24 to 60 FPS. This means that for a 12 MP sensor it would output 12 MP (let's say 8-bit RAW for the sake of simplicity) which at 24 FPS is 12 x 24 = 288 MB/s. That is really a huge amount of data, and this is a minimum, as bit-depth is often 12-bit so 50% more.
There are several ways to work with this. One is to have a processor which can read that amount of data but not output it, in which case each 12 MP frame is scaled down to around 2 MP and then the processor encodes and writes it to memory card. This allows you to get a 1080p video which is as wide as a 12 MP image would be. This is the most common implementation.
Another implementation is to take a crop-region of the image. This is extremely common with 4K video since very few sensors and processor can handle that data at 30 FPS. The disadvantage of this is a diminished angle-of-view. How much depends on the sensor resolution; for 12 MP, it would be very minimal since 4000x3000 is not much wider than 3840x2160. For a 16 or 20 MP sensor, it can be as much as 1.3X. Note that HD and 4K video have a 16:9 aspect-ratio, so even on a 12 MP sensor, there will be a high amount of vertical cropping.
Some sensors have additional circuitry that makes them able to output binned pixels which then must be resampled down to the desired video resolution. So say a 12 MP sensor with 4000x3000px resolution could output 2000x1500 which would then be resampled or cropped to 1080p. This way one does not need such fast readout and a less powerful processor can be used.
CMOS sensors - which are the most common nowadays - can also perform random reading of pixels so they can subsample pixels from a large area of the sensor, skipping some in between. This results in certain artifacts, particularly moire.