how can i use a compass to determine whether a needle is magnetized?

put the needle in a cup of water very carefully. It will float. Now if the needle is magnetized it will point north/south no matter how you carefully rotate the cup. You can check the direction with a compass.

Point the end of the needle at one end of the compass needle. Depending upon which end you pick, the compass needle will move toward or away from the needle that you are holding, IF the needle is magnetized.

Iron filings are very handy to determine if anything is magnetized. You can make your own filings by filing on a piece of iron. THe filings will stick to magenetized things.