The easiest way to find out is to remove the cover and start looking at labels, low tech. Have u been browsing the forum, know the major brand names? Say you find MSI 6541. Then GOOGLE "MSI 6541 PDF" should pull up the manual with all the specifications. The 2 items you are interested in is the CPU SOCKET, this tells you what cpu you can upgrade to. For GPU you want to know any available PCIe slot and how many lanes it can handle.
If this is a pre-built computer, Dell, HP etc, they may use their proprietary Motherboard and maybe more difficult to figure things out. Still, the user manual should have something in it, again GOGGLE "DELL blah-blah PDF," if you lost the manual.