功夫 originally meant 'mastery achieved through effort,' not just martial arts. It can refer to any skill perfected through practice, like 茶功夫 (tea-making art).
usage
下功夫 means 'to put in effort.' 没功夫 means 'no time' (colloquial). The martial arts meaning became globally famous through movies.