If you sew then the sewing machine is going to be your biggest investment and it makes sense to maintain it regularly. Usually, all this takes is for you to brush or blow away any dust or debris that's left after using your machine. Now and again you will need to oil the moving parts of your sewing machine but please make sure that you use oil that is specifically for sewing machine use i.e. a light oil, and not any old oil from the car parts store.
If your machine didn't come with a cleaning brush then a small nylon paint brush will suffice to clean away the lint and dust that gathers around the sewing foot area. Compressed air spray cans are also very useful for getting to the parts unreachable by the brush. Over time, if this lint and dust is allowed to gather and mix along with the oil it will create a a thick grime that is really sticky and can cause all sorts of problems which can result in a faster pace of wear and tear. In fact, if you have any trouble with your sewing machine then the first step is always to give it a good clean.
If specific areas need more attention then use the manual that came with your sewing machine to disassemble the parts which can then be cleaned in a small bath of cleaning fluid. Make sure to clean off the excess cleaning fluid before reassembly or let the parts stand overnight to allow the excess cleaning fluid to evaporate off. Follow the manual to understand where the machine may need oiling and where not to oil - this can be important! After cleaning, test your machine on a scrap piece of cloth just in case any oil makes its way out of the sewing foot area.
A little work after using your sewing machine can keep it in top condition, making it last for many years without any parts wearing out. All new machines will come with a booklet or video describing the periodic maintenance schedule and if you have aquired a machine without such a manual then you should be able to get one from the machine manufacturer.