Is ROM replaceable?

We can replace RAM, HARD DRIVE, CD ROM etc.
But can we replace ROM & processor?
for example: My computer’s processor is core i5 6th generation. Can I replace it with core i7 or any other processor?

I googled “how to replace your processor” and got a bunch of videos, maybe try that and look through those to see if they apply?

if it is on the same socket and your motherboard support it yes you can replace the old i5 with a new i7

Yes, Possible but some case if your motherboard supports the pin configuration of new Processor.

It depend from your motherboard. On the booting screen - when your computer starts, the first 4-5 sec - you can see the manufacturer and the type of your motherboard.
Or …
If you have Windows type in command line “wmic baseboard get product,Manufacturer,version,serialnumber” and you can see the inportant informations. Then you can see on the internet the user manual and can see what is replacable and how can you replace.
But if you are uncertain, find an expert.