Literally 'a ball that grazes the edge' — in
乒乓球 (ping-pong) an edge-ball still counts but is nearly impossible to return. The figurative sense is now far more common:
打擦边球 (dǎ cābiānqiú) means doing something technically legal but ethically dubious — risqué advertising, tax tricks, content that just barely avoids censorship.