#1
so i come up with melodys every once in a while and im like "hey that sounds good" so i try to come up with chords for it but i cant find anything that goes a long with it so my question is how to know how do i know what chords to play with the melody so that it sounds like it should be
#2
Method A:

1) Find out the key.
2) Trial-and-Error using the chords in that key under the melody.

Method B:

1) Examine the notes in the melody that land on emphasized beats in each measure and use those notes to form chords.
2) Modify your results to your liking, most likely by removing or adding some notes to each chord or changing the voicing.

Method A (otherwise known as "using your ear) is the easiest, but it's not very reliable. Method B is more complicated but it's reliable. It may not produce the exact results that you envisioned, so tweaking it with Method A is advised. Learning to do both is good.
#3
Find out the key of the melody - so what note does it seem to revolve around and come home to; and does it sound major or minor, does it use the b3 or 3 of the key note.

What notes does the melody emphasise/linger on? These will probably be notes of the chords you could play it over.

Lots of chord progressions have some part of this in them: IV - vii - iii - vi - ii - V - I (in a major key - adjust for minor keys).