you look at the market valuation of the company, look at the profits/loss the company has made, you look at the sector and see if there is potential for growth, look at the management of the company and you read the AGM report to see the strategies of the company, if you identify a good company which a low market valuation you look for a seller to buy cheaply same way you buy tomatoes in the market.
for example Kenol kobil has a market valuation of Kshs 12.36 billion, it has sustained losses in the last year, the management has changed, it trades in a sector with low margins. Do you think kenol kobil is worth kshs 12.36 billion? If you do you buy if not you wait for a lower price