They're not really both correct. 'I like apple' would only be correct if someone was like 'What flavour do you like?' and then, a correct response would be 'I like apple'. If you're talking generally about food you like, you would always use the plural i.e. 'I like apples', 'I like chips' or 'I like strawberries'. If you're talking about a specific apple, you would say 'I like this apple', or 'I would like this apple'. Hope that helps.