Can" and "could" are both modal verbs, but they are used in different contexts.
Can is used to express ability, permission, or a general possibility.
Example (ability): "I can swim."
Example (permission): "Can I borrow your pen?"
Example (possibility): "It can be very cold in winter."
Could is the past tense of "can," but it also expresses politeness, a hypothetical situation, or a less certain possibility.
Example (past ability): "When I was younger, I could run faster."
Example (politeness): "Could you pass the salt, please?"
Example (hypothetical): "If I had more time, I could help you."
Example (possibility): "It could rain tomorrow."
In general, "can" is used for more direct or factual statements, while "could" is used for more polite, hypothetical, or uncertain contexts.