Look at your laptop docs -- you should find what controls and capabilites are available for an external monitor. It's pretty common to have dual monitor support in the sense that you can have two active displays that can either show the same desktop or can toggled to split up the desktop or can only have one active display, but this will all depend on the actual design of the laptop.
As to sharing a monitor with a desktop PC, well, the old "standard" way of doing this is with an A/B switch -- you'd click A to view the desktop display, B to view the laptop. The switches I used were fine with a VGA display, these days there may be switches that can handle DVI/HDMI stuff as well, I don't know. But your laptop/desktop/monitor will, I suspect, have VGA ports, and you will need the A/B switch. With that, you just plug in the cable output from the switch to the laptop when you want/need to.