Ai cores are used in most blocks that contain computers and even some that don't. Sometimes you may need to build a block in order to progress to the next tier in order to build the block that you need, so be mindful and take a good look at progression, see Progression System before you start building so you don't waste precious cores.
Ai Core Cells are used to make Ai Cores, these are made by refining Ai Core scrap
You have a good chance of getting Ai cores when voting. You may also get other stuff like water, food and resources. You can vote using !supportus in game, then you will notice a page open up, you will need to click the green vote button, then sign into steam then once the vote is over, you can close the window and go back into game where you will type in chat !reward. (Note: Make sure your inventory is empty incase the reward is larger then what you can hold)
NPC Trading Station:
These stations sell Ai cores and buy Ai cores amongst other things. You can fine these locations in several places, Corpus and Greer will sell only Mk1s and Mk2s amongst other items and each planet will have two stations on them, in the north pole and in the south pole. There is also a station located in space, which is in between Tohil and Caldera, this station will sell mk3s and mk4s amongst other things. See Trade Stations for more information
Player trading:
You can establish trade deals with other players to purchase Ai Cores, however there is risk involved and its best to ally with the said player/faction in order to reduce risk.
NPC Hunting:
When starting out you will find wrecks which will contain Ai core scrap when you grind certain blocks, this can later be refined into Ai Core Cells and assembled into cores. You will also find loot in cargos on NPC's, they will always have cores in them among other stuff like food, ammo and resources. Keep in mind all cargos are open, so no need to grind them if you don't want to.
At some point you will see drones, they may attack you if you are within range of them, they have the best source of resources that you need at the beginning, at least double of what you find in wrecks, so make sure to check those downed drones!
When your threat level is high enough, the wrecks wont spawn anymore and all you will see is drones and AIDR Facilities, most bases will be protected by turrets, so be careful, but if you succeed in defeating the bases the rewards will be worth it.
After leaving the starter planets, you will find all sorts of different drones, small and large grids and also stations, they will contain a lot more loot and better scrap however they are much more difficult so be prepared!
PVP:
If you engage in combat with other players, you can salvage their grids for lots and lots of resources and possibly find a treasure trove of cores
Crafting Cores:
You can build cores by refining the Ai core scrap first and then assemble them.